Check pathinfo()
http://ca3.php.net/manual/en/function.pathinfo.php Yann www.phpquebec.org On Wed, 2004-02-04 at 12:56, John Taylor-Johnston wrote: > 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 -- Yann Larrivee <[EMAIL PROTECTED]> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php