shellcgi directory or cgi as a filetype?
- 1st the shell-CGI directory : bad solution
When you define a shell-CGI directory in NES3.6.x
a .php file placed in this directory will be handled by PHP and translated into html, good
a .html file placed in this directory and called by a browser will cause the server browser to be launched and the client won't see this page
a .gif file placed in this directory and called by a browser will cause the server GIF editor to be launched, etc..
It means : if you have a php project in a directory called /php/php-project1/ and you want to see pictures, you will have to do as followings :
- Always place your .php file under the shell-CGI directory
- Always refer to the .php file with the shell-CGI directory
http://server/php-shellCGI-directory/php/php-project1/page1.php
(Pb: Everybody can see your .php script with http://server/php/php-project1/page1.php
=Security PB when DataBase Connections with user and password)
- Always write the absolute path in the .php file when refering to images or .html pages
img src=/php/php-project1/image1.gif
(if not it will launch the server's GIF editor!)
- 2nd the shell-CGI as File Type : GOOD solution
- Every .php file under your document root will be handled by php before appearing in your browser
- You can code properly with relative links
- You can download php classes (often done by Aapache users) that only work with shell-CGI Filetype