开发者

php glob() on another directory on Server 2003 (IIS 6)

Always returns an empty array despite giving the IUSR_ "List Folder Contents" permission (and "Read" and "Read & Execute" permissons) on the folder being 'globbed'. glob() on a child directory (within th开发者_Python百科e directory I gave the permissions too) works fine. glob() also works on a specific file (which inherited the permissons) in the afore mentioned directory that it fails on...

UPDATE: The code I am using (which I can see works on other dirs) is:

$files = glob("..\\LocalFolder\\Images\\$partfilename*");
echo '<p><pre>';
print_r($files);
echo '</pre></p>';

I can get it to work on a dir within the Images dir!

UPDATE2: To clarify: the problem was: permissions were applied to the Images folder and the above code always returned an empty array.


Turns out you need to apply the permissions to the grand parent folder, i.e. in the above case: LocalFolder.

This is not very satisfactory as there could be many other files/folders therein that you do not want to give your IUSR_ (internet guest account user) the same permissions! I wonder whether glob() or Server 2003 is causing this behaviour?...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜