Re: php blank page problem
| From: | Gabor Hojtsy | Date: | Tue, 19 Jul 2005 09:30:54 +0000 |
| Subject: | Re: php blank page problem | ||
| References: | 1 | Groups: | php.mirrors |
| Request: | Send a blank email to php-mirrors+get-28779@lists.php.net to get a copy of this message | ||
Hi Shawn,
Our beginner tutorial already notes this (plus more about file name
extensions):
http://www.php.net/manual/en/tutorial.firstpage.php
Regards,
Gabor Hojtsy
> I have noticed many forums on the internet where users seem to be mystified by the blank php
> page that shows up when they test the following code (or any php code mixed with HTML);
>
> <html>
> <head>
> <title>Test PHP</title>
> </head>
>
> <body>
> <?php
> phpinfo ( );
> ?>
>
> </body>
> </html>
>
> The blank PHP pages are occurring because the users are attempting to write their code using an
> some editor that is not coding in plain text. The users are coding in text that contains HTML
> itself. WordPad was giving me this trouble. Once I copied and pasted my code written in WordPad
> (incorporates HTML features into text) into NotePad (strictly plain text) and WALLAH... when I
> accessed my phpinfo test page I no longer saw a blank page. Before I used notepad, when I would
> "view source" while visiting the blank web page I would see the following sorta tags and
> HTML;
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD>
> <META http-equiv=Content-Type content="text/html;
> charset=iso-8859-1"></HEAD>
> <BODY></BODY></HTML>
>
> If you wish to use WordPad, then you must save the file as a text document (.txt) instead of
> the default RichText format which allows the use of HTML formatting behind the scenes.
>
> Sincerely,
> Shawn Englerth
>