Bug #12323 Updated: // comment tag does not work
| From: | sander@php.net | Date: | Thu, 06 Dec 2001 19:11:37 +0000 |
| Subject: | Bug #12323 Updated: // comment tag does not work | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-72776@lists.php.net to get a copy of this message | ||
ID: 12323
Updated by: sander
Reported By: lael@evolutionmc.com
Status: Open
Bug Type: Output Control
Operating System: Mac OS X
PHP Version: 4.0.6
New Comment:
As asked before by Cynic, can you view the source of the output of the PHP-file? It doesn't
matter which browser you use. See the post of Cynic for instructions on doing this with IE or
Netscape ;)
Previous Comments:
------------------------------------------------------------------------
[2001-07-27 13:01:35] sniper@php.net
status: open
------------------------------------------------------------------------
[2001-07-25 11:40:51] lael@evolutionmc.com
The ## works just the same as the //
Also, for those that asked I try it in Netscape. Netscape
does the same thing. The php is being processed, it's just
that any line with a "//" or a "##" will first be displayed
up at the top of the page and then from the line after the
comment the PHP will resume.
------------------------------------------------------------------------
[2001-07-25 02:10:02] cynic@php.net
could you please check the source of the output (View -> Page Source in Netscape 4.x, and View
-> Source in IE) to check that PHP scripts get actually executed?
(Sorry if this is dumb, but the example you provided really looks like this is the case.)
------------------------------------------------------------------------
[2001-07-24 15:40:01] lael@evolutionmc.com
For those asking for an example of the script and the
output.
Using the following:
<code>
<?php
print("Working so far <BR>");
print("Still working next line is going to be a
comment<BR>");
// This line should be a comment
print("This is the next line past the comment<BR>");
?>
</code>
I get the following result:
<browser output>
// This line should be a comment print("This is the next
line past the comment
"); Working so far
Still working next line is going to be a comment
<end of browser output>
Thanking everyone for the help. Greatly appreciate it.
Lael
------------------------------------------------------------------------
[2001-07-24 14:28:59] lael@evolutionmc.com
Also in reply to the other suggestions regarding one liners
vs multiple line comments:
The lines I have commented are all on their own line and
are one liners. More or less, anywhere I use a "//" to
comment, the entire line is displayed to the user. The
following two scripts will give me the same result.
<?php
// This comment will show on the web page
?>
<?php
print('// This comment will show on the web page');
?>
I noticed in the documentation that the "//" was considered
a C++ style of commenting. Do I possibly need a particular
module or directive to say that "//" is a comment?
Thanks,
Lael
------------------------------------------------------------------------
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/?id=12323
Edit this bug report at http://bugs.php.net/?id=12323&edit=1