Re: Image script
| From: | Marcus Rasmussen | Date: | Sun, 13 Apr 2003 02:20:21 +0000 |
| Subject: | Re: Image script | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-143631@lists.php.net to get a copy of this message | ||
Look into the basename function
http://www.php.net/manual/en/function.basename.php
Ex:
$image = basename($_SERVER['SCRIPT_NAME'], '.php') . '.gif';
________________
Marcus Rasmussen
mr@gate58.dk
www.marcusr.dk
-------------------------------------------------------------
On 12-04-2003 at 16:02 luther wrote:
-------------------------------------------------------------
Hello,
Is there a script to use with images that will determine which graphic is
needed by the name of the page? For example, say you have a site which uses
a unique header graphic for each section but you don't want to hardcode the
exact name of the image into each HTML page. So, if you have a file called
"news.php" it would automatically determine the "News" graphic is needed for
that page.
Any help would be appreciated as I've looked and looked and can't find a
script like this anywhere.
Thanks.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php