I am trying to catch (echo) a file or directory from a certain directory.
I want to bind it to a variable.
No i am experiencing with realpath and he gives me the exact file location but from the server.
echo realpath($dir.'/'.$file);
So my echo shows me this:
/home/vhosts/mydomain.com/subdomains/develop3/httpdocs/uploads/sfm/c4ca4238a0b923820dcc509a6f75849b/Jellyfish.jpg
or /home/vhosts/mydomain.com/subdomains/develop3/httpdocs/uploads/sfm/c4ca4238a0b923820dcc509a6f75849b/nameofdirectory
it should be this:
uploads/sfm/c4ca4238a0b923820dcc509a6f75849b/Jellyfish.jpg
and
uploads/sfm/c4ca4238a0b923820dcc509a6f75849b/nameofdirectory
How can i achieve that?