PHP file makes webpage go blank

I'm a novice in PHP and recently changed the home page of my website from index.html to index.php. When I changed the file to PHP, it would display a white blank page. Changing the file back to HTML would restore the page back to normal.

Anybody know why the page goes blank when the extension is changed to PHP, and how I can fix it?

Upvotes: 1

Views: 771

Answers (1)

TraceElements
TraceElements

Reputation: 56

Some ideas:

  • If there's some PHP in the file there might be errors in it, see if you can check your webserver error log
  • There might be a .htaccess file that's hard coded to redirect to the html filename, see if you have a .htaccess file in that directory.
  • The webserver might be configured to not read php files, see if you can check your webserver error log

Upvotes: 1

Related Questions