|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2013-06-07 07:36 UTC] mhhechanova at gmail dot com
Description:
------------
When using UNC path or share drive as a parameter for is_readable, the function
returns FALSE even if the file exists
Test script:
---------------
<?php
$isReadable = is_readable("\\\\servername\\sharename\\file.txt"); //returns false
$fileExists = file_exists("\\\\servername\\sharename\\file.txt"); //returns true
?>
Expected result:
----------------
is_readable should return TRUE since the file exists.
Actual result:
--------------
is_readable returns FALSE
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 04:00:01 2025 UTC |
For reference please see the code below : ****Apache runs as Administrator Account <?php $isReadable = is_readable("\\\\servername\\sharename\\file.txt"); //returns false $fileExists = file_exists("\\\\servername\\sharename\\file.txt"); //returns true ?>is_readable("\\\\127.0.0.1\\test\\test.txt"); //returns TRUE However is_readable("\\\\servername\\sharename\\file.txt"); still returns FALSE ***ALL PERMISSIONS to that folder is set to ALLOW