note 80058 added to function.dirname

From: Date: Thu, 27 Dec 2007 12:42:01 +0000
Subject: note 80058 added to function.dirname
Groups: php.notes 
Request: Send a blank email to php-notes+get-134034@lists.php.net to get a copy of this message
The following finds the file name from the URL <?php //Get the script name $url_script_name=$_SERVER["SCRIPT_NAME"]; //Find the position of the last slash $last_slash = strrpos($url_script_name, "/"); //Finally get the file name $file_name = substr($url_script_name, $last_slash+1, strlen($url_script_name)); ?> ---- Server IP: 203.199.69.133 Probable Submitter: 203.196.155.10 ---- Manual Page -- http://www.php.net/manual/en/function.dirname.php Edit -- https://master.php.net/note/edit/80058 Del: integrated -- https://master.php.net/note/delete/80058/integrated Del: useless -- https://master.php.net/note/delete/80058/useless Del: bad code -- https://master.php.net/note/delete/80058/bad+code Del: spam -- https://master.php.net/note/delete/80058/spam Del: non-english -- https://master.php.net/note/delete/80058/non-english Del: in docs -- https://master.php.net/note/delete/80058/in+docs Del: other reasons-- https://master.php.net/note/delete/80058 Reject -- https://master.php.net/note/reject/80058 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#134034) next »