Penawaran Terbatas - mulai dari $0.80/bulan
00
HARI
14
JAM
38
MENIT
56
DETIK
Beli Sekarang
×

Pengetahuan Dasar

Temukan artikel terkait fitur, petunjuk penyelesaian masalah,
dan informasi teknis lainnya yang berkaitan dengan layanan hosting Hosting24.

I see blank / white page (if website is based on PHP)

Disunting pada:
blank page white screen php error

If your website is based on PHP, the most common reason for this problem is that you're missing a character somewhere. By simply leaving out a ' or } or ; somewhere, your PHP won't work. You don't get an error, you will simply get a blank screen.

1. PHP Error Reporting. You can learn a lot about what is going wrong from the error messages PHP gives you. If you aren't currently getting error messages, this tutorial http://php.about.com/od/troubleshooting/qt/php_error_reporting.htm shows you how to turn on PHP error reporting.

2. Test your code often. If you're testing each piece as you add it, then at least if you encounter this problem you know generally where to look for it... in whatever you just added or changed.

3. Try a color-coded editor. A lot of PHP editors (many even free) color code your PHP as you enter it. This helps you pick out lines that don't end because you'll have large chunks of code in the same color. It's non-intrusive for those of us who prefer to code with no bells-and-whistles, but helpful when troubleshooting.

4. Comment it out. One way to isolate the problem is to comment out large chunks of your code. Start at the top, and comment out all but the first couple lines, then echo () a test message right above the comment. If it echos fine, then the problem is below. Move the start of your comment and your test echo downwards as you work through your document until you find the problem.

  • Akses Website Builder
  • Jaminan Uptime 99.9%
  • Live Support 24/7
  • Powerful Control Panel
  • Jaminan Uang Kembali 30 Hari
Penawaran Terbatas!
Mulai dari
$
0
80
/bln
Hemat 90%
Beli sekarang