note 112173 added to function.chmod

From: Date: Tue, 14 May 2013 07:24:28 +0000
Subject: note 112173 added to function.chmod
Groups: php.notes 
Request: Send a blank email to php-notes+get-194794@lists.php.net to get a copy of this message
I have a problem with the opening of a folder with php. It shows this error: Forbidden You don't have permission to access /CLIENTI/lala/ on this server. AND here it is the php code: $dir = "CLIENTI/"; chmod('CLIENTI/lala',0644); $before = ''; $after = ''; if (is_dir($dir)) { chmod("CLIENTI",0777); if ($dh = opendir($dir)) { while (($file = readdir($dh)) !== false) { if( ($file !='.')&&($file !='..') ){ chmod($dir."/".$file, 0644); echo $before.'<a href="'.$dir.$file.'" >'.$file.'</a>'.$after. "\n"; echo "<br>"; } } closedir($dh); } } ---- Server IP: 69.147.83.199 Probable Submitter: 95.253.42.241 ---- Manual Page -- http://php.net/manual/en/function.chmod.php Edit -- https://master.php.net/note/edit/112173 Del: integrated -- https://master.php.net/note/delete/112173/integrated Del: useless -- https://master.php.net/note/delete/112173/useless Del: bad code -- https://master.php.net/note/delete/112173/bad+code Del: spam -- https://master.php.net/note/delete/112173/spam Del: non-english -- https://master.php.net/note/delete/112173/non-english Del: in docs -- https://master.php.net/note/delete/112173/in+docs Del: other reasons-- https://master.php.net/note/delete/112173 Reject -- https://master.php.net/note/reject/112173 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#194794) next »