Re: extract(filename)

From: Date: Wed, 04 Feb 2004 18:00:08 +0000
Subject: Re: extract(filename)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-176828@lists.php.net to get a copy of this message
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 <yannl@istop.com>

« previous php.general (#176828) next »