note 89822 added to function.strrchr

From: Date: Tue, 24 Mar 2009 18:47:13 +0000
Subject: note 89822 added to function.strrchr
Groups: php.notes 
Request: Send a blank email to php-notes+get-152401@lists.php.net to get a copy of this message
Maybe it's more secure to use basename() in finding extention, because a directory-name could contain a dot also... $file is a path with filename $new_ext_with_dot is the new extention to set $file = substr($file, -strlen(strrchr(basename($file), '.'))).$new_ext_with_dot; ---- Server IP: 87.54.44.10 Probable Submitter: 62.199.175.31 ---- Manual Page -- http://www.php.net/manual/en/function.strrchr.php Edit -- https://master.php.net/note/edit/89822 Del: integrated -- https://master.php.net/note/delete/89822/integrated Del: useless -- https://master.php.net/note/delete/89822/useless Del: bad code -- https://master.php.net/note/delete/89822/bad+code Del: spam -- https://master.php.net/note/delete/89822/spam Del: non-english -- https://master.php.net/note/delete/89822/non-english Del: in docs -- https://master.php.net/note/delete/89822/in+docs Del: other reasons-- https://master.php.net/note/delete/89822 Reject -- https://master.php.net/note/reject/89822 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#152401) next »