Jump to content

PHP includes in Dreamweaver


Mollox
 Share

Recommended Posts

Good to see you're all jumping in to say "yes" tongue.gif

Here's the problem....

Let's say I have a really basic table structure for a page, with a header area, menu area, main page area and a footer. A bit like this:

588710-phproblem.gif

And I want to fill these areas with active content, such as a header, menu set, footer etc...here's a sample header:

588712-phproblem2.gif

That's the simplest bit of html saved as a php file...

So I then go back to my php page and go to insert my php header, like so

588713-phproblem3.gif

So it pops a bit of php code in my code and i type in the file name, suddenly the screen goes like this:

588716-phproblem4.gif

Before I know it, I'm now essentially looking at the html code for the testheader.php file and god knows where my original table structure has gone?? And then there's that "untitled document /head>" tag - wtf is that trying to tell me??

I thought you could set up a table structure and then pop things in as you please but still be able to see and edit the original tables??

I have no qualms with doing any of this manually, in fact I've been deliberately avoiding php includes for ages but now I concede they are the way forward...

WTF is going on???? smashfreakB.gif

Link to comment
Share on other sites

Oh also, is there an easy way to make table rows nice and skinny? They seem to default to 20 odd px high and don't like to be shrunk further for me?

e.g. I might want to add a 5 px high (width variable with window size) grey dividing bar across my page. I would hope to be able to specify a single row with a grey fill and tell it it needs to be 5px high but it doesn't like that frown.gif

Link to comment
Share on other sites

As an example the row would look something like this:

<tr>

<td height="5" colspan="3" bgcolor="#999999"></td>

</tr>

The important thing to note is that there is no content in the cell. Dreamweaver automatically puts in a non breaking space ( ) in blank cells, this is where your extra height is coming from.

Alternate ways of doing the same thing are to use a horizontal rule <HR> or a very small gif (e.g. a grey 2 x 2 pixels image) which you can then resize to whatever size you want.

Link to comment
Share on other sites

Also:

With WinXP SP2 Microsoft created a Lockdown Zone to block all Active Content on pages that reside on your local hard drive. JavaScript and Flash will be blocked when you preview a local file - but the page will display normally when viewed on the internet.

To enable viewing active content in files that are on your local hard drive:

In IE, Choose Internet Options - Advanced

Scroll down to the Security Heading

Check the option labeled: Allow active content to run in files on my computer. You can also check the box above this if you want to allow active content to run from CDs.

Restart Internet Explorer for the changes to take effect

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...