Jump to content


Photo

Locked Code?


  • Please log in to reply
5 replies to this topic

#1 signature16

signature16
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 06 April 2006 - 02:35 AM

I am adding some php include stuff into tables and for some reason when i click back to design view everything is messed up and it throws an error. i am working directly off an ftp server and i am not using a template. to create new files i just right click int he file manager and make a new php file.


the error goes something like this: "making this change would require changing code that is locked"


Ive searched around but I cant find a simple answer to my problem. What is the simplest way to fix this problem?


Here is my code if it is any help:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="global/main.css" rel="stylesheet" type="text/css">
</head>

<body>
<?php
    $page = $_GET['page'];
?>
<table width="790" border="0" cellspacing="0" cellpadding="5" align="center">
  <tr>
    <td>
    sadf
    <?php require('header_footer/header.php'); ?>
    </td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>
        <?php
        //file that has page links
        include('global/pages.php');            
        ?>
    content
    </td>
  </tr>
  <tr>
    <td>
    footer asdf
    </td>
  </tr>
</table>
</body>
</html>

Here is was the design view looks like after the error has been thrown. ahhh how do i fix this?

[a href=\"http://img395.imageshack.us/img395/6555/untitled16qt.jpg\" target=\"_blank\"]http://img395.imageshack.us/img395/6555/untitled16qt.jpg[/a]

When i try to deletethe php code out of the table area..it gives me the error to. here is the error screenshot.



[a href=\"http://img446.imageshack.us/img446/7210/untitled11oi.jpg\" target=\"_blank\"]http://img446.imageshack.us/img446/7210/untitled11oi.jpg[/a]


help........... :(

#2 txmedic03

txmedic03
  • Members
  • PipPipPip
  • Advanced Member
  • 313 posts
  • LocationCall, TX, USA

Posted 06 April 2006 - 06:04 AM

Well quit trying to use Dreamweaver to do PHP. Take what you already have and insert your PHP includes using notepad.

SEMPER FIDELIS!

I can't stop you from doing something silly, but at least I can help you do it right.


#3 moberemk

moberemk
  • Members
  • PipPipPip
  • Advanced Member
  • 695 posts

Posted 06 April 2006 - 02:26 PM

I've been using Dreamweaver for PHP code for a long time, and it's always worked for me. There's no reason to entirely drop Dreamweaver because of one little error. Instead, just re-create the page-it isn't that big. See if that helps.
Disclaimer: No matter how harsh I may be, I'm always IMO only.

#4 txmedic03

txmedic03
  • Members
  • PipPipPip
  • Advanced Member
  • 313 posts
  • LocationCall, TX, USA

Posted 06 April 2006 - 08:46 PM

I'm not suggesting dropping dreamweaver because of one error. I'm suggesting dropping dreamweaver because it does not properly format xhtml and php. At least not in Dreamweaver MX.

SEMPER FIDELIS!

I can't stop you from doing something silly, but at least I can help you do it right.


#5 moberemk

moberemk
  • Members
  • PipPipPip
  • Advanced Member
  • 695 posts

Posted 06 April 2006 - 09:00 PM

Then upgrade to DW8. Valid XHTML and PHP formatting. Isn't that expensive either. Besides, some people just don't have the time or want to learn an entire language.
Besides, this is the Dreamweaver Help forums. If your help is to say "get rid of Dreamweaver" then please, find another forum for it. If you want to help people fix their problems with Dreamweaver, then please do so. Not to insult you or start an argument or anything, just saying what I think.

As for the locked code, again, just putting the whole thing into a brand-new page should do the trick.
Disclaimer: No matter how harsh I may be, I'm always IMO only.

#6 txmedic03

txmedic03
  • Members
  • PipPipPip
  • Advanced Member
  • 313 posts
  • LocationCall, TX, USA

Posted 06 April 2006 - 09:47 PM

Sorry about that, didn't notice the dreamweaver help bit. I use the RSS feed and just look at the message title most times. I still say for this particular problem you can just as easily open the xhtml file in notepad insert the php and name it with php extension and be done, but I am biased against dreamweaver and all other WYSIWYG editors because I have yet to find one that formatted xhtml the way I want it done. I am very particular about my code.

SEMPER FIDELIS!

I can't stop you from doing something silly, but at least I can help you do it right.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users