Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

Amrmhish on "copy function does not work, move files and creat foulder"

$
0
0

Hello
i have a problem ,i have a plugin which will move a file after been uploaded
and put it in a specific folder ,,
i tested the code on a normal page which i created in the root
and it is working fine ,but when it is in the plugin code, it is not working
the code is pretty simple
$file = "./wp-content/uploads/jacket.jpg";
$newfile="./uploads/jacket.jpg";
if(!copy($file, $newfile)) {
error_log("failed to copy $file...");
}
ofcourse i tested the plugin code if it is running ,and i am getting error log in wamp that failed to copy ,,help i am hopeless


Viewing all articles
Browse latest Browse all 8245

Trending Articles