rajmohan Posted August 29, 2006 Share Posted August 29, 2006 Hai guys i need a help now in my project i want to get the last [b]index.php[/b] from below one (http://localhost/mohan/Aug06/26Aug06/gallery/admin/index.php), not only index.php there are lot of files are there how to get the last one Quote Link to comment Share on other sites More sharing options...
Jenk Posted August 29, 2006 Share Posted August 29, 2006 Read up on mod_rewrite for Apache.And if you are using that as a string within your script, rather than a url:[code]<?php$url = 'http://localhost/mohan/Aug06/26Aug06/gallery/admin/index.php';$page = substr($url, strrpos($url, '/') + 1);?>[/code] Quote Link to comment Share on other sites More sharing options...
rajmohan Posted August 29, 2006 Author Share Posted August 29, 2006 Thank jank i am realy happy ya . Is there any method available Quote Link to comment Share on other sites More sharing options...
onlyican Posted August 29, 2006 Share Posted August 29, 2006 of if you want the page name$_SERVER['SCRIPT_NAME'];which will return /index.php Quote Link to comment Share on other sites More sharing options...
rajmohan Posted August 29, 2006 Author Share Posted August 29, 2006 yes it is working friend Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.