Where
do I put my PHP scripts?
You can place your PHP scripts anywhere in your website. You should
place your scripts where they make most sense for your website
organisation. [Back to top]
What
file extension should my PHP scripts have?
The webserver recognises a PHP script by its file extension. It
is recommended that your PHP scripts be in a file ending with
.php, or php4 (.php3 is also supported for backwards compatibility). [Back to top]
PHP scripts have their file permissions set to 700 or -rwx------.
we simply suggest you chmod all files (including html files and
data files) permissions set to 705 or -rwx---r-x, all of the files
will be working fine and secure. No others can stolen your PHP
script and data!
Note, manually chmoding your scripts to make them group or world
writable will result in your scripts failing to run properly.
[Back to top]
Where
is my base directory (Document Root)?
Each website has its own base directory. Where possible always
use relative filename mappings. If you *must* use a full path
please derive from the $DOCUMENT_ROOT environment variable in
your script. This will ensure that your website works reliably
even if it is moved to a different directory by Freedom To Surf.
Here is a sample script which outputs your base directory:
1) Have you uploaded the script in FTP ASCII mode
2) Does the script filename end in .php or .php4?
3) Ensure the script is not writable by others.
4) Ensure the directory the script is in is not writable
by others.
5) Has your base path been set correctly?
If all these checks are okay then there is probably something
wrong with the script. Please debug this in your own environment
before placing on the Free4Web.net. [Back to top]