Thread: Help with //

Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2008
    Location
    DownUnder, overlooking South Pole.
    Posts
    984
    Plugin Contributions
    6

    Default Help with //

    I have suddenly developed a problem where recently added comments prefaced by // (eg // start bugfix#24) are now appearing throughout my browser pages.

    Looking at the php files in Crimson Editor, I notice that many of these comments (not all but mostly those recently added) are coloured black rather than the normal green.

    Furthermore, where whole sections of code have been commented out by //, in some cases some or all of this code remains active (ie blue) and is causing errors on pages.

    The worse thing is that I can't find an immediate fix for this problem, other than replacing // with <!-- -->, which I found works in some instances but not all, and I fear it would be easier to start afresh than going through each of the 1600 odd files.

    While I suspect a virus infection, possibly one that has affected the keyboard, my Comodo anti-virus has been kept up-to-date and reports no problems.

    Please help as I am deeply disheartened and profoundly perplexed.

  2. #2
    Join Date
    Nov 2004
    Posts
    77
    Plugin Contributions
    0

    Default Re: Help with //

    obviously if you have files across your zencart installation that has had changes made to your code then you have a bigger issues to worry about.

    in any case comments are dependent on the langauge you are writting in.

    <!-- --> for instance applies mainly to any html based coding.

    example <!--<h1>wow</h1>-->


    // comments out a single line in most serverside scripting langauges, in this case PHP which is contained between <?php and ?> tags

    example <?php //$wow = 'wow'; ?>

    I hope that makes sense as its off the cuff explanation oversimplified but I would suggest having a professional have a look at what exactly is going on with your site files.
    Dan - statuscontrols.com/web
    web programming and design

  3. #3
    Join Date
    Sep 2008
    Location
    DownUnder, overlooking South Pole.
    Posts
    984
    Plugin Contributions
    6

    Default Re: Help with //

    Thanks IGD

    I think you have nailed the problem - me not paying enough attention to the flow of code:

    // for php
    <!-- --> for html

    (slaps wrist as I knew this already)

    My only surprise is that it took almost a fortnight for some of these errors to surface.

    So I learn and live another day.

 

 

Similar Threads

  1. Problems with Numinex Mod, can somebody help me with coding...
    By strugglingnovice in forum General Questions
    Replies: 5
    Last Post: 23 Sep 2013, 05:42 AM
  2. Easy Populate 1.2.5.5 with Stock With Attributes Help please
    By shahram in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 4 Oct 2012, 07:56 PM
  3. Help with Creating Product Type with certain pricing scenario
    By spoma in forum Setting Up Categories, Products, Attributes
    Replies: 6
    Last Post: 16 Jul 2008, 03:45 PM
  4. Need Help with a couple of issues with the shop
    By chrisb in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 3 Oct 2006, 12:36 PM

Posting Permissions

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