Posted by Toby A Inkster on 02/23/07 21:59
laredotornado@zipmail.com wrote:
> Good question. You can assume for the purposes of this question that
> extension is anything following the "." in which there will be exactly
> one "." in the file name.
$x = pathinfo('/path/to/file.txt');
$X = $x['dirname'] . '/' . 'foo' . '.' . $x['extension'];
print $X;
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux
* = I'm getting there!
[Back to original message]
|