开发者

fopen won't open files across network

I can use fopen to open local files but c开发者_运维问答an't open files across network on a different machine. I can map the drives and look at the files but can't open them using fopen.


Assuming you're running Apache on Windows (since you talk about "mapping" the drive):

If you used the defaults during installation then apache is running with the Local System account, which doesn't have any network privileges. So you have to make sure it runs as a (domain) user that can access the network drive(s). You can change this via Control Panel, Administrative Tools, Services (right click on Apache, select Properties and select a user on the Log On tab).


In order to open remote files you need to have the php.ini setting "allow_url_fopen" enabled. Is that the case in your settings?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜