开发者

PHP is_file returns false (incorrectly) for Windows share on Ubuntu

Ubuntu server, PHP 5.3, connected via Samba to Windows server share.

I am using file_exists() to check for availability of file on Windows machine. It returns false, although the filepath does exist. Meanwhile, file_get_contents() on the exact same filepath works fine.

I'm wondering if it's a permission issue, since I'm having trouble configuring permissions of the files on the Windows share (it says I don't have permission to change permissions on them). When I look at the permissions through Nautilus, it says the user and group are both root, with 755 rights. I'd like to change the group to www-data, but can't seem 开发者_如何转开发to do it.


It could be directory seperators. Try preg_replace('%(\\|\)%', '/', $path)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜