PDA

View Full Version : same div based content across multiple pages


action711
03-13-2010, 08:17 PM
I have a couple of divs over many pages that I'd like to display the same content, and update this content over time.

Would I use PHP to do this?

If so, how easy is it to do?

Thanks for reading.

domedia
03-13-2010, 11:24 PM
You can use PHP Includes:
http://www.dreamweaverclub.com/php-includes.php

action711
03-15-2010, 09:34 AM
Great, that's just what I'm looking for. Thanks.

Although it didn't seem to work on my Mac (10.5.6 PPC).

I made a .php file with the line

<?php phpinfo() ?>

and put it into my webfolder and viewed it, but instead of displaying any info, it just displayed the line as above.

Do I have to install php on my mac to get anything to work? I thought it came pre-installed with 10.5.6...

davidj
03-15-2010, 11:55 AM
You need to install PHP

Use XAMPP. I think this is MAC friendly

domedia
03-15-2010, 01:37 PM
Do I have to install php on my mac to get anything to work? I thought it came pre-installed with 10.5.6...

If you want to PHP to work on your local machine, you need to install PHP. If you want it to work on your webserver, you need it there as well.

davidj
03-15-2010, 04:12 PM
Do I have to install php on my mac to get anything to work? I thought it came pre-installed with 10.5.6...I have heard this. Maybe you are not working from your process directory

search for a directory called htdocs.

If you find it its possible its installed but maybe not working

action711
03-16-2010, 05:08 PM
All good now, I had neglected to rename my original file .php.

Thanks guys.

davidj
03-16-2010, 08:19 PM
That would do it!