Can anybody solve this for me.
I want to copy a file. And I'm using a variable as the file's path. The variable is an appending string of the path.
But the variable never works. If I hardcode the path it will work but never as a variable which I'm positive is the same as the hardcoded pathway. the variable fails with quotes around it, no quotes, etc. What gives??
// my code
$npath = $DOCUMENT_ROOT.'/apps/digidogo/users/'.$foldername.'/thumbs/'.$news_thumb_name."<br>";
if(copy($news_thumb, "$npath")) {
echo "File copied successfully";
} else {
echo "File not copied successfully";
}
//now destroy the file
unlink($news_thumb);
}
}