Problems copying a file to a network drive
Posted: Thu Aug 09, 2007 9:09 am
I have been having problems trying to copy a file over to a network drive using PHP 4.3.6
Any help is appreciated.
I have tried both of these methods below
$localFile = 'c:\temp\test.txt';
$remoteFile = 'e:\temp\test.txt';
if (!copy($localFile, $remoteFile))
{
echo "php copy failed";
}
echo "<br>";
$sysCommand = "copy $localFile $remoteFile";
echo $sysCommand;
system($sysCommand, $retval);
echo "<br>System copy result = $retval";
Any help is appreciated.
I have tried both of these methods below
$localFile = 'c:\temp\test.txt';
$remoteFile = 'e:\temp\test.txt';
if (!copy($localFile, $remoteFile))
{
echo "php copy failed";
}
echo "<br>";
$sysCommand = "copy $localFile $remoteFile";
echo $sysCommand;
system($sysCommand, $retval);
echo "<br>System copy result = $retval";