note 108433 added to function.file-exists
| From: | hungdotappteamfromgmaildotcom | Date: | Thu, 26 Apr 2012 04:33:15 +0000 |
| Subject: | note 108433 added to function.file-exists | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-187349@lists.php.net to get a copy of this message | ||
I have a problem when i use php read file on LAN network through ip or computer name.
$url = "\\\\192.168.0.200\\testshare\\1.txt";
if(file_exists($url) == TRUE) {
echo "OK";
} else {
echo "Error";
}
//result: always "Error".
If i use function file_get_contents ($url , true); result:
Warning: file_get_contents(\\192.168.0.200\testshare\1.txt) [function.file-get-contents]: failed to
open stream: Permission denied in D:\services\htdocs\test.php on line 3
Of course, folder "testshare" is set share and permission everyone full control. If i tape
web browser: \\192.168.0.200\testshare\1.txt It read content of file 1.txt.
Can you help me? Every idea help me, i thanks very much.
----
Server IP: 69.147.83.197
Probable Submitter: 27.2.124.97
----
Manual Page -- http://www.php.net/manual/en/function.file-exists.php
Edit -- https://master.php.net/note/edit/108433
Del: integrated -- https://master.php.net/note/delete/108433/integrated
Del: useless -- https://master.php.net/note/delete/108433/useless
Del: bad code -- https://master.php.net/note/delete/108433/bad+code
Del: spam -- https://master.php.net/note/delete/108433/spam
Del: non-english -- https://master.php.net/note/delete/108433/non-english
Del: in docs -- https://master.php.net/note/delete/108433/in+docs
Del: other reasons-- https://master.php.net/note/delete/108433
Reject -- https://master.php.net/note/reject/108433
Search -- https://master.php.net/manage/user-notes.php