extract(filename)
| From: | John Taylor-Johnston | Date: | Wed, 04 Feb 2004 17:56:41 +0000 |
| Subject: | extract(filename) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-176823@lists.php.net to get a copy of this message | ||
In Borland Delphi, I can extract a filename from the paramstr(0)
and then exchange out the extension.
ChangeFileExt(extractfilename(paramstr(0)), '.html');
Is there a way to extract the filename of "/home/www/calendars/february2004.html"
and swap its extension for .htm?
february2004.htm is pure html. In february.html I include a header and a footer
and then ("february2004.htm");
I would like to have some automatic code to do this instead of hand-coding 48 files.
Do-able? How? I know these variables (PHP Version 4.3.4) but don't know how to start?
$REQUEST_URI
$_SERVER["REQUEST_URI"]
$SCRIPT_NAME
$_SERVER["SCRIPT_NAME"]
$_SERVER["PHP_SELF"]
$PHP_SELF
Thanks,
J