PDA

View Full Version : dreamweaver and php




sk3pt1c
Jan 31, 2007, 05:35 AM
how can i run php pages from dreamweaver?
i have some script i want to put in my pages and i can't preview them
unless i upload them to the server
can dreamweaver do that in any way?
thanks



Mitthrawnuruodo
Jan 31, 2007, 05:56 AM
I don't think DreamWeaver is capable of previewing php, I'm afraid.

You can however enable php support for the (Apache) web server on your Mac. There are several different approaches to enabling this... easiest is to edit your httpd.conf file, but there are also thing like MAMP if you don't want to mess with your system...

And TacoHTML has php previewing capabilities (but I'm not 100% sure if it will work if php support is off for the web server).

nightelf
Jan 31, 2007, 09:50 AM
You cannot preview PHP scripts from Dreamweaver.

You need to activate PHP and the webserver in your Mac, move the files to ~/Sites/ and check it in your browser at http://localhost/~yourusername/

rogersmj
Jan 31, 2007, 09:51 AM
PHP is not just markup like HTML. It's a scripting language that has to be interpreted by a PHP server, which then outputs HTML to a browser. You can't just "preview" PHP. If you get yourself a web server running, like Apache, then you can easily execute PHP files as long as they are within the directory Apache is setup to serve.