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? YesNo
Add to Favourites Print this Article
Powered by WHMCompleteSolution