Testing PHP and paths in PHP code

Created a test php version of the index page. Had to update the ssi include codes to php includes, such as <?php include(“./ssi/Main_Menu.htm”);?>. Learned that the syntax for the path of an included file in different in PHP. In HTML, starting the path with ‘/’ means the root of the web site. In php, ‘/’ means the root of the web server. As suggested here and here, there must be php code to change the location of what is considered ‘root’, but I have yet to figure this out.

There must also be PHP specific code to include the “last modified date” and to run the CGI hit counter. Found this solution for CGI in PHP:

<?php echo system(‘mycgi.cgi’); ?>

is probably easier still. You may have to specify the directory with ./ or even more fully with http://www.example.com/ .

The above did not work on my site. Powweb must require an include statement. The syntax that works is : <?php include(“http://www.glenpritchard.com/cgi-bin/mcount.cgi”);?>

As for the last modified date, the discussion here is useful, although the last entry is confusing and does not seem to work.

Leave a Reply