I have a problem that I don't know how to solve. Let me explain it...
Directory structure:
-/public_html/lab/
-/public_html/lab/upload.php
-/public_html/lab/plugins/
I am really newbie with php+ftp, but I have the idea that FTP does not use "absolute root path" (/home/user/public_html/), instead it use "absolute user path" according to the user in question (/public_html), right?
Well, in the upload.php
I have the code where the FTP class take a file temporally stored at the same folder where upload.php reside (/public_html/lab/) and then try yo move it to /public_html/lab/plugins/
folder.
FTP class receive a path where you want to move the file. But, I don't want to pass the path like absolute, I want to avoid this:
ftp->move('the-file.zip', '/public_html/lab/plugins/');
I would like to do something like this:
ftp->move('the-file.zip', '../plugins/');
But the code above looks like is not valid. So, how can I reproduce that result?