无法在windows中使用PHP将文件从一个驱动器复制到另一个驱动器
我尝试使用PHP创建一个文件,并尝试使用以下代码将创建的文件复制到另一个驱动器无法在windows中使用PHP将文件从一个驱动器复制到另一个驱动器,php,windows,copy,Php,Windows,Copy,我尝试使用PHP创建一个文件,并尝试使用以下代码将创建的文件复制到另一个驱动器 <?php $file = 'C:\xampp\htdocs\testfile.txt'; $myfile = fopen( $file, "w") or die("Unable to open file!"); $txt = "This is a test"; fwrite($myfile, $txt); fclose($myfile); copy($file,'Y:\test.txt'); PHP用户是否
<?php
$file = 'C:\xampp\htdocs\testfile.txt';
$myfile = fopen( $file, "w") or die("Unable to open file!");
$txt = "This is a test";
fwrite($myfile, $txt);
fclose($myfile);
copy($file,'Y:\test.txt');
PHP用户是否有权复制到该驱动器上的文件夹?@JayBlanchard它是一个网络映射驱动器,仅仅因为它被映射并不意味着PHP脚本有权写入它。IUSR帐户无法使用映射。您知道如何检查它吗?PHP在IUSR帐户下运行。