Editing destroys php code

Ask a Question related to Macromedia Contribute General Discussion, Design and Development.

  1. #1

    Default Editing destroys php code

    When editing pages made in Dreamweaver based on a template, Contribute removes
    the white space in the code chunk. This causes "parse error on line ..." (this
    line is the line after </html>!)

    Here is the code as it should be

    <?php
    require_once("/Library/WebServer/Documents/includes/ldapauthfuncs.php");
    if(!checkuser(2)){
    //User is not logged in or does not have the appropriate userlevel so give
    them the login screen
    include "/Library/WebServer/Documents/includes/ldaplogin.php";
    exit;
    }
    ?>

    Here is what Contribute does

    <?phprequire_once("/Library/WebServer/Documents/includes/ldapauthfuncs.php");
    if(!checkuser(2)){ //User is not logged in or does not have the appropriate
    userlevel so give them the login screen include
    "/Library/WebServer/Documents/includes/ldaplogin.php";exit;}?>

    If I edit in text editor (code is locked in Dreamweaver) or similar to
    rectify, all is good until Contribute edits the page again.

    please help.

    <?php
    require_once("/Library/WebServer/Documents/includes/ldapauthfuncs.php");
    if(!checkuser(2)){
    //User is not logged in or does not have the appropriate userlevel so give
    them the login screen
    include "/Library/WebServer/Documents/includes/ldaplogin.php";
    exit;
    }
    ?>

    timminehan Guest

  2. Similar Questions and Discussions

    1. Enable source code editing
      It says that an Administrator can set an external editor to edit a pages source code, however, I cannot access any external editor. It is grayed out...
    2. editing PDF in illustrator without breaking code
      In order to explain this, i'll give it as a scenario. Let's say you design a form with minimal graphics in Adobe Illustrator CS3. you save a copy...
    3. Paypal code and editing in Contribute
      I have a site which is being edited with Contribute. One page ( http://www.centerfornaturalism.org/support.htm ) of the site uses paypal to take...
    4. editing code
      Hi..... this may be a basic question, but its infuriating me, so please put me out of my misery. I've just updated from ultradev 4 to studio...
    5. Contribute changes template code when editing
      i have a javascript in my template which is in a locked area. when i edit a page in contribute, it removes the line breaks in the script and breaks...
  3. #2

    Default Re: Editing destroys php code

    I get exactly this error with my PC Contribute.

    It looks like you're using a mac too. Are you using Mac Contribute or PC.

    Is your code outside of a template directive? IOW not supposed to be touched
    at all?

    What I can't understand is that DW has been able to handle php since the year
    dot, well 1.2, while Contribute can't. Perhaps the MM Contribute department
    should go and talk to the MM Dreamweaver department and get a lesson in
    Templates.

    HdotNET Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139