|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-07-23 17:19 UTC] lael at evolutionmc dot com
When I use the "//" as the comment, the text behind the tag is displayed out to the user. I can replace it with a "/*" and put a "*/" at the end to make it work. But I was hoping I had missed some compile option or something that is causing this to not work. To make the installs on my G3 PowerMac Laptop, I have used the instructions found at: http://www.devshed.com/ Server_Side/Administration/BuildingOnOSX/ Any suggestions are welcome. Thanks, Lael PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 15:00:01 2025 UTC |
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, LaelFor 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