• 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

The topic ‘move files and creat foulder’ is closed to new replies.