my script file path is:
I need to run code from this path that will move images from path:
My problem is that I have no idea how to force “rename” go two directories back in path.
I was trying something like:
$srcPath = realpath(dirname(__FILE__) . '/../..' . '/uploads/2017/04/obrazek.png');
error I’m getting atm (I’ve changed my folder permissions, so maybe it is something with path?):
Warning: rename(C:xampphtdocswordpresswp-contentuploads20174obrazek.png,C:xampphtdocswordpresswp-contentuploadsimages): access denied
. (code: 5) in C:xampphtdocswordpresswp-contentpluginsuploadsdir-managertest.php on line 16