home *** CD-ROM | disk | FTP | other *** search
/ PC World 2001 August / PCWorld_2001-08_cd.bin / Komunikace / phptriad / phptriadsetup2-11.exe / php / pear / PHPDoc / index.php next >
Text File  |  2001-02-08  |  3KB  |  102 lines

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2.  
  3. <html>
  4. <head>
  5.     <title>PHPDOC Version 1.0beta</title>
  6. </head>
  7.  
  8. <body>
  9.     <table width="560">
  10.         <tr>
  11.             <td align="left" valign="top">
  12.                 <font face="Arial, Helvetica" size="2">
  13.                     <h1>Welcome to PHPDoc!</h1>
  14.                 
  15.                     PHPDoc currently requires a late PHP4 version (4.0.3dev) to work.
  16.                     Some earlier version like to crash with memory trouble. 
  17.                     <p>
  18.                     PHPDoc was programmed without    using PHP4 features that means 
  19.                     it will run with version prior to    4.0.3dev on fine day. 
  20.                     But again: my PHP3.0.15 crashed when it started to render the 
  21.                     HTML documents :(.
  22.                     <p>
  23.                     I'll try to provide a solution as soon as possible.
  24.                 </font>
  25.             </td>
  26.         <tr>
  27.             <td align="left" valign="top"><hr></td>
  28.         </tr>
  29.         <tr>
  30.             <td align="left" valign="top">
  31.                 <pre>
  32.                 <?php
  33.                 $start = time();
  34.                 
  35.                 // WARNING: long runtimes! Make modifications 
  36.                 // to the php[3].ini if neccessary. A P3-500 
  37.                 // needs slightly more than 30 seconds to 
  38.                 // document phpdoc itself.
  39.                         
  40.                 // Directory with include files
  41.                 define("PHPDOC_INCLUDE_DIR", "c:/www/apache/doc/");
  42.                 // Important: set this to the Linebreak sign of your system!
  43.                 define("PHPDOC_LINEBREAK", "\r\n");
  44.         
  45.                 // main PHPDoc Include File
  46.                 include("./prepend.php");        
  47.         
  48.                 $doc = new Phpdoc;
  49.                 
  50.                 // Sets the name of your application.
  51.                 // The name of the application gets used in many default templates.
  52.                 $doc->setApplication("PEAR Repository");
  53.                 
  54.                 // directory where your source files reside:
  55.                 $doc->setSourceDirectory("c:/www/apache/form/");
  56.                 
  57.                 // save the generated docs here:
  58.                 $doc->setTarget("c:/www/apache/doc/apidoc/");
  59.                 
  60.                 // use these templates:
  61.                 $doc->setTemplateDirectory("c:/www/apache/doc/renderer/html/templates/");
  62.                 
  63.                 // source files have one of these suffixes:
  64.                 $doc->setSourceFileSuffix( array ("php", "inc") );
  65.         
  66.                 // parse and generate the xml files
  67.                 $doc->parse();
  68.                 
  69.                 // turn xml in to html using templates
  70.                 $doc->render();
  71.                 
  72.                 printf("%d seconds needed\n\n.", time() - $start);
  73.                 ?>
  74.                 </pre>    
  75.             </td>
  76.         </tr>
  77.         <tr>
  78.             <td align="left" valign="top"><hr></td>
  79.         </tr>
  80.         <tr>
  81.             <td align="left" valign="top">
  82.                 <font face="Arial, Helvetica" size="2">
  83.                     <h2>Finished!</h2>
  84.                     PHPDoc has finished his work. The generated XML and HTML files can be found in
  85.                     the directory specified with setTarget() in the above code. This is per default "installationdir/apidoc/".
  86.                     Within this directory is another directory named "keep/". It contains a stylesheet file and 
  87.                     a frameset you can use to browse the HTML files. 
  88.                     <p>
  89.                     Don't be disappointed if PHPDoc makes documentation mistakes. Always remember it's currently
  90.                     only grabbing not parsing. If PHPDoc will develop as a standard this will change as soon 
  91.                     as possible. Please be patient and wait until "... later this year." ;-).
  92.                     <p>
  93.                     Have fun!
  94.                     <p>
  95.                     <a href="mailto:ulf.wendel@phpdoc.de">Ulf</a>
  96.                 </font>
  97.             </td>
  98.         </tr>
  99.     </table>
  100. </body>
  101. </html>
  102.