<?php include(str_replace(".html", ".htm", $_SERVER["PATH_TRANSLATED"]));?>

From: Date: Thu, 01 Jul 2004 15:52:47 +0000
Subject: <?php include(str_replace(".html", ".htm", $_SERVER["PATH_TRANSLATED"]));?>
Groups: php.general 
Request: Send a blank email to php-general+get-189472@lists.php.net to get a copy of this message
Hi, I need another variable. I need the filename itself. I want to substitute /var/www/html/new1/foo.html for /var/www/html/new1/phpinfo.htm and then include /var/www/html/new1/html/phpinfo.htm This doesn't do it anymore. I can't see a way to go up to directory "html": <?php include(str_replace(".html", ".htm", $_SERVER["SCRIPT_FILENAME"]));?> John P.S. Happy Canada Day!

« previous php.general (#189472) next »