Re: Blank screen problem
| From: | Roel Dillen | Date: | Sat, 08 Jan 2005 09:49:47 +0000 |
| Subject: | Re: Blank screen problem | ||
| References: | 1 2 3 4 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-25273@lists.php.net to get a copy of this message | ||
It was something rather stupid
I copy pasted the code from a pdf file.
It used non standard quotes in the echo line (UTF-8 instead of ASCII).
echo “<p>This is a PHP line</p>”;
instead of
echo "<p>This is a PHP line</p>";
Since PHP doesn't parse incorrect blocks of code I got a blank screen.
to protect your privacy/and your code (copyright you know)
The moral of the story: never copy paste pieces of programming.
I still hear my professor programming say it.
Thanks a lot to anyone who tried to help.
Roel
On Sat, 8 Jan 2005 20:38:43 +1000, Michael Purdy <michael.purdy@optusnet.com.au> wrote:
Roel I am not sure what you expect to see but what you should see in view source is only the HTML output of the phpinfo() function. At present your code does have one problem which may be causing you problems and this echo “<p>This is a PHP line</p>”; Should be echo '<p>This is a PHP line</p>'; That is use a single (') quote and not (") quote. Change it to a single ' and see how you go then Mike ----- Original Message ----- From: "Roel Dillen" <dillenroel@scarlet.be> To: <php-windows@lists.php.net> Sent: Saturday, January 08, 2005 7:08 PM Subject: Re: [PHP-WIN] Blank screen problem<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD> <BODY></BODY></HTML> this is what I get when I view the source And the following is in test.php <html> <head> <title>PHP Test</title> </head> <body> <p>This is an HTML line</p> <?php echo “<p>This is a PHP line</p>”; phpinfo(); ?> </body> </html> Quite curious is it not? On Fri, 07 Jan 2005 14:45:34 +0000, Luis Moreira <luis.moreira@esinnovation.pt> wrote:When you run a PHP script, if you "view source" you don't see thecode.What you see is the result of the script. If the script doesn't output text, be it html or not, there's nothingtosee... The script <html> <body> <?phpecho "<b>Hello World</b><br>"; echo "It's me !";?> </body> </html> would produce *Hello World* It's me ! with this as the "view source" result <html> <body> <b>Hello World</b><br>It's me !</body> </html> Luis Roel Dillen wrote:CLI5 II ran a basic php script (php_info) but appearantly it doesn't do anything. In viewsource the php code doesn't show up. I have Apache 2 and PHPhave adapted my httpd.conf so it should be able parse the php through the-- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpmethod. I have added these lines to achieve this LoadModule php5_module "c:/php/php5apache2.dll" AddType application/x-httpd-php .php PHPIniDir "C:/php" I have added c:/php to my Path variable in windows