Jump to content

Archived

This topic is now archived and is closed to further replies.

signature16

Locked Code?

Recommended Posts

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:

[code]
<!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>
[/code]

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........... :(

Share this post


Link to post
Share on other sites
Well quit trying to use Dreamweaver to do PHP. Take what you already have and insert your PHP includes using notepad.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.