Page 1 of 1
Curious....
Posted: Fri Jul 20, 2007 10:19 pm
by anthonyw
I'm sure this is a very simple question with an obvious answer that eludes me BUT, here goes. I'm accustomed to building web pages with html, but am ignorant about php. I'm wondering if there is any way of seeing how the web page in php is going to look as you can an html page through dreamweaver, or even explorer for that matter. It baffles me how you can tell what the site is going to look like without being able to preview it. Is there some editor ( using a windows xp operating environment) that allows you to view the page as you would an html page?
A premature thanks.
Posted: Fri Jul 20, 2007 10:27 pm
by feyd
Most of us pros typically set up a (web) server, either on our own machine, or on an in-house development server.
Posted: Fri Jul 20, 2007 10:48 pm
by Chalks
That was the first thing I tried to find out too...
This thread helped.

Posted: Fri Jul 20, 2007 11:13 pm
by toasty2
I too run a local webserver (running Abyss Web Server and PHP 5). Network Drives for easy script editing.
Re: Curious....
Posted: Sat Jul 21, 2007 4:47 am
by The Phoenix
anthonyw wrote:I'm sure this is a very simple question with an obvious answer that eludes me BUT, here goes. I'm accustomed to building web pages with html, but am ignorant about php. I'm wondering if there is any way of seeing how the web page in php is going to look as you can an html page through dreamweaver, or even explorer for that matter. It baffles me how you can tell what the site is going to look like without being able to preview it. Is there some editor ( using a windows xp operating environment) that allows you to view the page as you would an html page?
A premature thanks.
In most cases, you cannot.
However, if you use some templating engines (Smarty, etc), you can (with considerable effort) get a template that can be opened in a WYSIWIG editor (Dreamweaver, NVU, etc).
Thats not to say that it will look *identical* to the output, but it gets you far closer.
In general, its mostly a test/rewrite cycle to get what you want. As other posters have noted, running it on a local webserver really helps.
Posted: Sat Jul 21, 2007 5:39 am
by onion2k
I don't use it, but I know RapidPHP (an editor/IDE) has a built-in web server for testing scripts.
Posted: Sat Jul 21, 2007 8:44 am
by superdezign
There are quite a few editors that will let you preview PHP in them. I use PHP Designer which just uses my currently installed PHP version for display. However, I find the easiest way is to just install Apache and open it in the browser.
Posted: Sat Jul 21, 2007 9:38 am
by RobertGonzalez
Eclipse has a built in browser that will save at intervals and display as you go along. It is a neat but annoying feature in that, for the most part, I know what my code is doing and what my markup/CSS is doing. Seeing it on the screen only confirms what I had suspected as I code it. Sometimes things show up differently that I expected, but it usually comes down to a silly CSS rule or something of that nature.
I recommend to all developers to install a local web server, local database server and local install of PHP so you can develop right on your machine without having to code/FTP/test/recode. Locally you can code, test, code, test, push to production. It is the fastest way to develop.
Posted: Sat Jul 21, 2007 10:13 am
by superdezign
Everah wrote:I recommend to all developers to install a local web server, local database server and local install of PHP so you can develop right on your machine without having to code/FTP/test/recode. Locally you can code, test, code, test, push to production. It is the fastest way to develop.
And for those of us with "affordable" (cheap) hosting packages, you'll save bandwidth.
Posted: Sat Jul 21, 2007 12:10 pm
by RobertGonzalez
superdezign wrote:Everah wrote:I recommend to all developers to install a local web server, local database server and local install of PHP so you can develop right on your machine without having to code/FTP/test/recode. Locally you can code, test, code, test, push to production. It is the fastest way to develop.
And for those of us with "affordable" (cheap) hosting packages, you'll save bandwidth.
+1. Good point.
Posted: Sat Jul 21, 2007 7:38 pm
by Ollie Saunders
I work off a Samba share on my Windows PC served by my Linux server. This is mainly because I prefer to execute PHP in the Linux environment and my production server is Linux so it makes sense that I'm able to clone the two server configurations. I would be 100% Linux if it wasn't for needing Photoshop and Illustrator,

. Anyway, back to the main point, coding directly off your production server is not a good idea but there are in fact some editors that will let you "mount" an FTP connection and use it as if it were the local file-system, albeit a bit slower, which has proven useful on a couple of high stress "must fix this NOW!" moments. Although I won't be doing that now I've finally got my subversion repo how I like it.