Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I am trying to copy files from a map directory which is I drive to my local hard disk. But when i tried copying, i got the following error msg. What is the cause of this problem ?
Warning: copy(I:\temp\xxxx.pdf) [function.copy]: failed to open stream: No such file or directory in C:\Program Files\xampp\htdocs\check.php on line 25
failed to copy ...Code: Select all
$result = mysql_query($sql, $connection);
while($dbarray = mysql_fetch_array($result)){
$filename = 'C:/temp/'.trim(strtolower($dbarray[0])).'.pdf';
$existfilename = 'I:/temp/'.trim(strtolower($dbarray[0])).'.pdf';
if (file_exists($filename)) {
echo "The file $filename exists<BR>";
} else {
if (!copy($existfilename, $filename)) {
echo "failed to copy $file...\n";
}
}
}feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]