Curious....
Moderator: General Moderators
Curious....
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.
A premature thanks.
That was the first thing I tried to find out too... This thread helped. 
- The Phoenix
- Forum Contributor
- Posts: 294
- Joined: Fri Oct 06, 2006 8:12 pm
Re: Curious....
In most cases, you cannot.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.
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.
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
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.
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.
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
And for those of us with "affordable" (cheap) hosting packages, you'll save bandwidth.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.
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
+1. Good point.superdezign wrote:And for those of us with "affordable" (cheap) hosting packages, you'll save bandwidth.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.
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
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.