SitePoint Sponsor |
|
User Tag List
Results 1 to 1 of 1
-
Jan 29, 2001, 13:31 #1
- Join Date
- Oct 2000
- Posts
- 430
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hi,
I'm trying to work out how to change the file included on a php page with respect to the page url.
The idea is this
sport/home.php should include sport/home.htm
sport/away.php should include sport/away.htm
etc etc
can I use $PHP_SELF to do this?
would this work:
$includefile = str_replace(".php", ".htm", basename($PHP_SELF));
include("sport/ . $includefile");
Bookmarks