Correct path to get into a folder outside the www server using php and linux

Asked

Viewed 118 times

1

I have a program in php on a linux server and wanted to know how it is possible to access an element that is outside the www folder. for example, I have the www folder and a folder for my project where I have my main index.php page

but I have the following directory

/var 
  /www
     /Projeto
       /index.php

and at the same level of the folder www I have a folder called spool and another called images.

getting

/var
   /spool
      /imagens

how can I reference the path of an image from within my php application by having access to an image from the images folder for example? currently use a string strcaminho, which gets the following value

strcaminho= "/var/spool/images/logo.png";

but I cannot access, which is the correct way to get the file path out of my www folder according to the folders?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.