note 58341 added to function.opendir

From: Date: Tue, 01 Nov 2005 11:19:36 +0000
Subject: note 58341 added to function.opendir
Groups: php.notes 
Request: Send a blank email to php-notes+get-97916@lists.php.net to get a copy of this message
There might be a bit of truth to that. If, by chance, the webmaster made a form saying "type a random directory name here" and used that in the function, there'd be a problem. So let's eliminate the 'function' part $files=shell_exec("ls directory"); $result=explode("\n",$files); '$result' will now be an array of the directory files. You can use variables in the shell_exec command, but don't use anything that could be user-sent. ---- Manual Page -- http://www.php.net/manual/en/function.opendir.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+58341 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+58341&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+58341&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+58341&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+58341&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+58341&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+58341&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+58341&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+58341&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#97916) next »