fopen不会跨网络打开文件 [英] fopen won't open files across network

查看:93
本文介绍了fopen不会跨网络打开文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以使用fopen打开本地文件,但是不能在另一台计算机上的网络上打开文件.我可以映射驱动器并查看文件,但无法使用fopen打开它们.

I can use fopen to open local files but can'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.

推荐答案

假定您正在Windows上运行Apache(因为您谈论的是映射"驱动器):

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

如果在安装过程中使用了默认设置,则apache将使用本地系统帐户运行,该帐户没有任何网络特权.因此,您必须确保它以可以访问网络驱动器的(域)用户身份运行.您可以通过控制面板",管理工具",服务"(在Apache上单击鼠标右键,选择属性",然后在登录"选项卡上选择一个用户)进行更改.

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).

这篇关于fopen不会跨网络打开文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆