PHP - enable in subdir not working

This is what I have

site.com/user/filehere.php 

I need to go to

 site.com/user/messages/index.php 

index.php

 <?php include_once("../filehere.php"); ?> 

The problem is that inside filehere.php

there is another including

filehere.php

 <?php include_once("../menu.php); ?> 

and they are not included in the / messages directory, even if all this is normal, when I directly include the file

+1
include directory php subdirectory include-path
May 11 '17 at 13:43
source share
1 answer

add __DIR__ to your file path to represent the current php directory. See the message for details.

+1
May 11 '17 at 13:53 on
source share



All Articles