1

I just set-up a new server and moved all my files across; in it I have the following line of code :

include($_SERVER['DOCUMENT_ROOT'].'/config/log.php');

Now if I leave it as it is I get an error that the log is not included, if I die('msg') before it with a message I will see the message; If I die after it I get nothing;

p.s. My path is correct; and even if it was't I would probably get an error ; which I am not !

Ash
  • 564
  • 2
  • 5
  • 23

2 Answers2

0

If you are doing this during migration and the path is absolutely correct; meaning there is no include error in debug mode & in log file; then probably you need to check the code in the included file.

Now IF that file uses any type of short opening tag e.g. <? instead of <?php

Then you have two choices:

  1. Not to use short opening tag
  2. Or Locate php.ini file and set short_open_tag to on

p.s. dont forget to restart your Apache server.

Community
  • 1
  • 1
Ash
  • 564
  • 2
  • 5
  • 23
-1

You can try (tested)

$path=$_SERVER['DOCUMENT_ROOT'].'/config/log.php';
include $path;
Raag Singh
  • 515
  • 1
  • 4
  • 10