Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Daf
    Daf is offline
    Regular Coder
    Join Date
    Feb 2005
    Location
    East Texas
    Posts
    140
    Thanks
    32
    Thanked 2 Times in 2 Posts

    Commenting out includes

    Hi all,

    Having a bit of trouble commenting out some php includes. I have some includes that are only used periodically - so I comment them out at times. I generally use firefox so I didn't notice, right off, that IE was still displaying the includes! What??

    See below:

    Code:
    <!-- Bulletin  -->
    /*<?php $CatID='53';  include('news/News.php'); ?>*/
    Displays this in IE /* */

    Code:
    <!-- Bulletin  -->
    <!-- <?php $CatID='53';  include('news/News.php'); ?> -->
    Displays this in IE -->

    The only way I was able to accomplish it was to break the include code bu adding some space between the first 2 characters of the line.

    Code:
    <!-- Bulletin  -->
    <!-- < [space] ?php $CatID='53';  include('news/News.php'); ?> -->
    I guess I don't understand how to comment out this include correctly for IE. Please advise.

    Thanks
    Daf

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,929
    Thanks
    6
    Thanked 1,041 Times in 1,014 Posts
    Hm, might be that the closing bracket of the PHP command makes IE think the comment is closed:
    Code:
    ws.php'); ?> -->
    You could/should try it with a PHP comment within the PHP:

    Code:
    <?php /* $CatID='53';  include('news/News.php'); */ ?>
    or use the PHP command brackets for the comment:
    Code:
    <!-- ?php $CatID='53';  include('news/News.php'); ? -->

  • #3
    Daf
    Daf is offline
    Regular Coder
    Join Date
    Feb 2005
    Location
    East Texas
    Posts
    140
    Thanks
    32
    Thanked 2 Times in 2 Posts
    Thanks! Both of your suggestions work.

    Daf


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •