PHP显示空白页面[关闭]

I am using Apache on Ubuntu, and every PHP page shows nothing. However, other files, such as images are displayed normally. What should I do?

Start by changing the file extension of one of your php files to .php4 or .php5.

If you still see a blank page you might have errors in your code, to debug insert the following code at the top of your php files:

error_reporting(E_ALL);  // will report any errors your code may have
ini_set("display_errors", 1); // will display those errors

Still seeing a blank page ? If you're on shared hosting please ignore the following step and report the problem to your hosting provider.

It's possible that php isn't installed correctly with Apache, to install it on Ubuntu run:

sudo apt-get install php5
sudo apt-get install libapache2-mod-php5
sudo /etc/init.d/apache2 restart

Please Let me know if it worked.