wiki2xhtml can edit PHP files too. They can be used e.g. for a contact form (like at http://granjow.net under “About”) or for other dymanic applications.
If you want to use PHP, you ought to have at least some basic knowledge. There are some good tutorials in the web and some good books on the market. Take a look at the Wikibook about Programming PHP. The Open Directory project dmoz has got a list of PHP Tutorials.
Using PHP files with wiki2xhtml requires only two different commands.
- This comment can be written anywhere in the file and prevents it from being edited by wiki2xhtml. It has the same effect like copying the file.
- If PHP code isn't processed correctly, it can be enclosed with
nowiki-Tags. This prevents wiki2xhtml from processing the code (and e.g. inserting wrong paragraphs …).
- For instance if you use sessions with PHP you've got to insert PHP code before the first html tag. All text written before the endtop-tag will be inserted at the top of the file—unprocessed.
To start a session, you have to insert following code at the top of the file:
Further examples can be found in the menu under “Examples”.
- [↑] If angle brackets are to appear in the text, they can be escaped. Then they have no more effect. The closing angle bracket (>) should be escaped too!
- [↑] Session: See php.net: Sessions