tig12.net
Site personnel

Admin
Rubriques proches

Nombre de visites : 440
Mise en ligne : 03/2008
Dernière modif : 06/2008

 Installation and usage

First, download the archive and uncompress it ; this generates a directory phpsimpledoc/.

Web usage

You need an operational web server (like Apache) with PHP 5 running on it.
  • Put directory phpsimpledoc/ somewhere visible by your web server.
  • Visit the corresponding page, for ex. http://localhost/path/to/phpsimpledoc/src/index.php.
    A page containing a list of links should appear.
  • Clicking on one of these links orders phpSimpleDoc to generate the documentation of the corresponding program.

These links correspond to .ini files located by default in directory phpsimpledoc/user.
These .ini files (called user command files) are the main way to interact with the program.
Each .ini file under phpsimpledoc/user contains the directives needed by phpSimpleDoc to generate the documentation of one program.
To organize the programs to document, directory user/ can have subdirectories, which permits to have sub-lists on index page.
If a file or a subdirectory starts by "z.", it is not listed in the index page ; this permits to archive, or temporarily disable useless commands without deleting them.

Just after installation, the index page contains two links : 'phpSimpleDoc', to generate the documentation of phpSimpleDoc, and 'PHP', to generate the documentation of php classes, functions, constants. You can use them to test phpSimpleDoc and generate the corresponding doc, but you must first modify the corresponding .ini file (see page User command files).
Note : documentation of PHP is not working in current version, works only in version draft1.

Use from command line

There is no specific script for phpsimpledoc, but if PHP CLI (Command Line Interface) is installed on your machine, you can invoke it from a shell by :
php -f /path/to/phpsimpledoc/src/index.php path/to/command.ini
path/to/command.ini can be :
- the absolute path to the .ini user command file.
- the relative path to the .ini user command file, from /path/to/phpsimpledoc/user

Documenting a new program

To document a program, you must create a user command file (.ini file).
Instructions to create a user command file are on page User command files.
If you use the web interface, you must put it under phpsimpledoc/user directory ; reloading page index.php makes this link appear on screen ; click on the link to generate the documentation.
If you call phpSimpleDoc from the command line, the .ini file is not necessarily under phpsimpledoc/user directory ; you just need to specify as an argument the absolute path to the .ini file.
Then you are not obliged to store your command files under directory /path/to/phpsimpledoc/user.


--Site écrit avec SPIP--Licence du contenu publié sur ce site--