Jump to content

Php Includes & Dreamweavermx


wampthing

Recommended Posts

I have been messing around with PHP includes. I am just starting to learn, with some success. Specifically I am trying to include things like the menu bar at the top, etc.

I have uploaded my files and gotten it to look right on the web, but the Design view (Not the PREVIEW in explorer) seems to not show anything under the PHP Include. It will show a place for the include, but everything under it is missing. Anyone have any Ideas? DO I just need to learn to do it all by hand and not mess with Dreamweaver? Please say no.

What I am trying to do is get away from using frames, but make the site updating easier.

Link to comment
Share on other sites

I use DreamWeaver (DW) and PHP includes and the unfortunate thing is that DW can't interpret the PHP commands so it sticks in the PHP placeholder. You could look at the whole testing server thing in DW but sometimes it's just easier to upload it and view the page to see if it comes out the way you want.

 

Another thing you can do is to put a web server on your PC that understands PHP and view the pages locally. One server that has been recommended in this forum before is the Abyss web server. It was free but I'm not sure about the current version. Anyway, you can set up your PC as a web server and have it "serve up" the pages, interpreting PHP as it goes. You can do a search on the forum for Abyss and find more info.

Link to comment
Share on other sites

  • 4 weeks later...
I think to see the includes on your computer you will need to install apache web server with php

 

For php editors here is a roundup of editors with reviews.

 

So, as Don mentioned, regardless of editor (whether it is Dreamweaver or PHP Designer 2005) I would still need to install php and Apache Web Server on my computer, right?

 

Thank you.

Link to comment
Share on other sites

In Dreamweaver MX and newer, it WILL show any HTML in the include file, but of course dynamic PHP stuff won't show up. Includes are one of the very few PHP things that Dreamweaver does actually read and do something with, at least to show any HTML stuff in the include.

 

I use this feature to create consistent headers, footers, or navigation bars -- all the HTML for these is in a seperate file which is included via PHP into the actual pages; that way I only have to edit one file to update the navigation bar. I prefer this to using Dreamweaver templates, and the navigation bar will show up in design view on Dreamweaver (although you can't edit it without opening up the actual include file).

Link to comment
Share on other sites

  • 2 weeks later...

Rather than installing apache, etc., you can also download for a 30 day trial, and then purchase for about $20 SOKKIT. This gives you space on your local computer to run PHP code to test prior to uploading to your web server.

Link to comment
Share on other sites

Rather than installing apache, etc., you can also download for a 30 day trial, and then purchase for about $20 SOKKIT.  This gives you space on your local computer to run PHP code to test prior to uploading to your web server.

Jim, this is the coolest thing I've seen all day. Took me less than 20 minutes to download, install, and get my site up and running on my local machine. Thanks for the tip.

 

-Tim

Link to comment
Share on other sites

you can also download for a 30 day trial, and then purchase for about $20 SOKKIT.  This gives you space on your local computer to run PHP code to test prior to uploading to your web server.

 

 

How different is this from Live View that Dick mentioned earlier?

Link to comment
Share on other sites

you can also download for a 30 day trial, and then purchase for about $20 SOKKIT.  This gives you space on your local computer to run PHP code to test prior to uploading to your web server.

 

 

How different is this from Live View that Dick mentioned earlier?

 

 

I don't use Dreamweaver as my primary tool... so I could not answer that question for you in comparisoin.

 

SOKKIT basicly creates a PHP enabled web server on your local computer, where you can then place your PHP pages and run as if they were on a web server, per se.

Link to comment
Share on other sites

  • 7 years later...

Hello... jnull i registered to here only to ask about this program, i know it's abit late not sure if you will reply me or even using this forum, i'm confused the same as the author of this topic, looking for a programa to make php easy and this sokkit sounded brilliant could help me, you or somebody?

Link to comment
Share on other sites

@sweetlati - It does look like Sokkit is no longer available - http://www.sokkit.net/ - unfortunate, because it was a well working resource for PHP that didn't require a web server. I would recommend, if you're wanting to learn PHP - that you get a domain name, setup a hosting account here with TCH, then purchase this book in paper or digital - and start coding through the examples in it. You'll be PHPing in no time.

 

Book: http://www.sitepoint.com/books/phpmysql5/

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...