Posts

Showing posts from September 25, 2011

PHP Examples - snippetdb.com

Image
http://snippetdb.com/php/

PHP: get current filename as variable

<?php $currentFile = $_SERVER["SCRIPT_NAME"]; $parts = Explode('/', $currentFile); $currentFile = $parts[count($parts) - 1]; $currentFile = "\"in_".$currentFile."\""; echo $currentFile;       ?>