【发布时间】:2017-01-27 04:02:44
【问题描述】:
有人可以帮助我如何在网络共享文件夹中创建文本文件。共享文件夹有用户名和密码。 非常感谢! 这是我的代码
<?php
system('net use \\192.168.*.*\folder$ password/user:username');
$dir = "\\192.168.*.*\folder$";
if (is_dir($dir))
{
if ($dh = opendir($dir))
print "able to access directory tree.";
}
else { print "not access tree.";}
?>
【问题讨论】:
-
发现php无法读取folder$(隐藏文件夹)。删除 $(使其可见)并工作。