RE: [PHP] Error when browse a directory~~~

From: Date: Thu, 28 Dec 2000 04:11:37 +0000
Subject: RE: [PHP] Error when browse a directory~~~
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-32037@lists.php.net to get a copy of this message
You need to give your web_server user (usually "nobody") permission to read from the /home/ directory if you want it to read from it... -----Original Message----- From: dON'T tALK sO mUCH~~~ [mailto:shout_up@on9.org] Sent: Wednesday, December 27, 2000 22:09 To: php-general@lists.php.net Subject: [PHP] Error when browse a directory~~~ Hi, 3) $d = dir("."); 4) echo "Handle: ".$d->handle."<br>\n"; 5) echo "Path: ".$d->path."<br>\n"; 6) while($entry=$d->read()) { 7) echo $entry."<br>\n"; 8) } 9) $d->close(); I use the above tag to browse the current directory, it works fine in my local machine, but got the following error in my hosting server, what changes do I need to make on the server in order to run this script? Thanks! Warning: OpenDir: Permission denied (errno 13) in /home...... on line 3 Warning: $d is not an object in /home...... on line 4 Handle: Warning: $d is not an object in /home...... on line 5 Path: Warning: $d is not an object in /home...... on line 6 Fatal error: Member function used on a non-object in /home...... on line 6 -- dON'T tALK sO mUCH~~~ http://www.iphotoz.com http://www.lewis.com.hk/ http://www.on9.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#32037) next »