0
I have a problem in my PHP that I do not know what is happening.
Currently, whenever I go back a folder in some directory I use ./
for example: ". /javascript/jquery.js"
I don’t know why this is happening because the correct way to get back folders would be ../javascript/jquery.js
and this is getting in the way of some processes. When I use include include_once("./model/Produto.php")
and when I’m gonna call that include somewhere else it gives the bug failed to open stream: No such file or directory because it is . / and not ../
Is there any way to fix this? Remembering that whenever my index.php uses .htaccess
in the middle of the page that uses a $_GET
which takes what was typed in the url and gives a include_once("caminho/arquivo.php")
, this can influence something?
Edit1: if I use .. / to go back instead of . / gives the error failed to open stream: No such file or directory in any directory
The problem is that using DIR I can’t get back folders
– Conrado Saud
Warning: include_once(C: xampp htdocs Projetobusca view../controller/Empresacontrolador.php): failed to open stream
– Conrado Saud
Yes, I’m sorry... I forgot the bar at the end.
– Gustavo Jantsch