Search results for 'get current file'. 1 post(s) found.
- 2007/10/16 How to get current filename as variable ?
Sometimes you need just the filename of the current script, without the path. This snippet does just that using the SCRIPT_NAME and explode function.
<?
$currentFile = $_SERVER["SCRIPT_NAME"];
$parts = Explode('/', $currentFile);
$currentFile = $parts[count($parts) - 1];
?>
$currentFile = $_SERVER["SCRIPT_NAME"];
$parts = Explode('/', $currentFile);
$currentFile = $parts[count($parts) - 1];
?>
Another posts included in "PHP"
| How to redirect browser in PHP ? (0) | 2007/10/16 |
| PHP date and time formatting (0) | 2007/10/16 |
| How to declare array in PHP like C/C++ (0) | 2007/10/16 |
| email validation, simple (0) | 2007/10/16 |
| How to ban / block IP addresses (0) | 2007/10/16 |
| for loop - simple (0) | 2007/10/16 |
| form action - detect form post (0) | 2007/10/16 |
| How to make random number ? (0) | 2007/10/16 |
Trackback : Cannot send a trackbact to this post.
-
Subject different money making ideas
2010/01/29 04:13
moneyideas
-
Subject different money making ideas
2010/01/29 13:02
moneyideas
-
Subject different money making ideas
2010/01/31 16:42
moneyideas

Prev

Rss Feed