/ home / customer care

Knowledgebase
You are here: Support > Knowledgebase > Programming

Get Current Filename (PHP)

Quite often we need to get current filename. This can be done easily with below code snippet:

$currentFile $_SERVER["SCRIPT_NAME"]; 
$parts Explode('/'$currentFile
); 
$currentFile $parts[count($parts) - 1];



Was this answer helpful?

Add to Favourites
Print this Article

Powered by WHMCompleteSolution


Language:
Valid XHTML 1.1 Valid CSS Powered by Apache Powered by MySQL Powered by PHP UTF8 Charset Minimium 800x600 Resolution