html - setting up __DIR__ path in php -
here is output of directory path
echo(__dir__); /users/tsrinivas/www/album/module/photos/view/photos/photos
but want point 4 directories before,output should like.
/users/tsrinivas/www/album/public/images/upload/
how achieve this?
you can traverse directory tree using .. down 5 blocks , add rest of path
$path = __dir__ . "../../../../../public/images/upload/"; or place __dir__ in file located in /users/tsrinivas/www/album/public/images/upload/
Comments
Post a Comment