Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP: Getting a blank page [duplicate]

Tags:

php

I am getting a blank page on a PHP when I use require_once to include another php. This is working, however, on other files. Now, I reduced all my code to this:

echo 'testing';
require_once 'C:/xampp/htdocs/folder/file.php';
echo 'now show this';

The code above just produces a blank page, no errors or anything, even though this file is being used on other files with no problems. I put a trace on the top of that file and nothing. I am using it in the same way the other files are using it, just a require_once.

If I comment file.php to nothing but a line reading echo ' - inside file', the line is displayed, however it is not continuing with the rest. Thus, showing the following output:

testing - inside file

It's not going with the rest... What could be the reason of this?

like image 372
luqita Avatar asked Oct 19 '25 06:10

luqita


1 Answers

Try to enable error reporting on your page. That might shine a light on your problem.

Place this code in your page and let me know if you get any errors.

error_reporting(E_ALL);
ini_set('display_errors', '1');
like image 58
Laurent Zuijdwijk Avatar answered Oct 21 '25 20:10

Laurent Zuijdwijk