#22760 [Bgs]: Echoing Problems
| From: | dud_boi at hotmail dot com | Date: | Wed, 19 Mar 2003 09:54:08 +0000 |
| Subject: | #22760 [Bgs]: Echoing Problems | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-35915@lists.php.net to get a copy of this message | ||
ID: 22760
User updated by: dud_boi at hotmail dot com
Reported By: dud_boi at hotmail dot com
Status: Bogus
Bug Type: Output Control
Operating System: Windows Server 2003 RC2
PHP Version: 4.3.1
New Comment:
Im gonna be very embarrased if i say this but i forgot to name is as
php instead of html... and even as php it would be no use as my links
all appear in an iframe. Terribly sorry to cause so much unwanted
trouble..
Previous Comments:
------------------------------------------------------------------------
[2003-03-18 11:34:36] sniper@php.net
user error.
------------------------------------------------------------------------
[2003-03-18 08:12:13] andrew@php.net
Are you getting an 'undefined variable' error from your code? $var
must be initialized before you can concatenate to it...
<?php
/* Initialize the var first */
$var = '';
$var .= $_SERVER['HTTP_REFERER']."<br>";
echo $var;
?>
Also, if there is no referer to the page (easily spoofed) or if the
page is loaded directly, it'll return an empty string.
Try that and repost to the report...
~ Andrew Heebner
------------------------------------------------------------------------
[2003-03-18 06:08:55] dud_boi at hotmail dot com
oops..i realised why.. anyway, your search page still seems to have
problems
------------------------------------------------------------------------
[2003-03-18 06:07:15] dud_boi at hotmail dot com
Terribly sorry, i realised that sometimes my code just doenst appear. I
have <?php
$var .= $_SERVER['HTTP_REFERER']."<br>";
echo $var;
?>
which i inserted into a file. it doesnt parse the code at all. when i
view source, it acutally appears as is. My other php codes are working
fine.
p.s. when i search for things on the php.net site, if there are
results, they just dont appear
------------------------------------------------------------------------
[2003-03-18 05:50:28] andrew@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php
If you can provide more information, feel free to add it
to this bug and change the status back to "Open".
Thank you for your interest in PHP.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/22760
--
Edit this bug report at http://bugs.php.net/?id=22760&edit=1