Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/file/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
PHP-如何在网络共享文件夹中创建文本文件_Php_File_File Io - Fatal编程技术网

PHP-如何在网络共享文件夹中创建文本文件

PHP-如何在网络共享文件夹中创建文本文件,php,file,file-io,Php,File,File Io,有人能帮我在网络共享文件夹中创建一个文本文件吗。共享文件夹具有用户名和密码。 非常感谢! 这是我的密码 <?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 direc

有人能帮我在网络共享文件夹中创建一个文本文件吗。共享文件夹具有用户名和密码。 非常感谢! 这是我的密码

<?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不知何故无法读取文件夹$(隐藏文件夹)。删除$(使其可见)并工作

<?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不知何故无法读取文件夹$(隐藏文件夹)。删除$(使其可见)并工作。