Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

AFPoster

macrumors 68000
Original poster
So I'm attempting to add comments around certain lines of code in my Index.php file and for some reason they're still showing on my site. Any help would be greatly appreciated, code is below:

PHP:
/* This button to be hidden for now
<a class="btn btn-warning" href="#">Hello</a>
don't remove until proper approval */

I've also tried:

PHP:
#This button to be hidden for now <a class="btn btn-warning" href="#">Hello</a>

Making sure this one is all on 1 line.
 
Just a point of clarification.

The comments shown in your first post are PHP and the one in your last post is HTML.

I know you have already answered your own question. I'm just pointing this out because understanding the difference might save you some time in the future. They way PHP and HTML can be mixed on a page can make it difficult to follow what is going on.
 
Thanks for this! I have to adjust my .htaccess file so this is perfect.

One clarification, while inside PHP tags <?php and ?> there are two approaches:

PHP:
// to comment current single line only like this one.

PHP:
/* 
To add a multiline comment as
big as you need.
*/
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.