View Full Version : Viewing .phtml in DW design view

12-10-2004, 01:31 PM
Is it possible to view .phtml files in Dreamweaver design view? I added .phtml to my extensions file, but this only allows me to view it in code view.

Thank you,
D Anderson

12-10-2004, 03:15 PM
DW can show .phtml pages in design view, but only the plain HTML portions of the page. It cannot interpret the php code (the parts between <? and ?>). The same goes for other server-side scripting languages such as asp and ColdFusion.

Some of the marketing material may have led you to believe that it can, but php support is limited to color-coding the syntax and prompting for parameters (in code view). It can also generate php code for certain functions. However, DW doesn't "run" server-side scripts.

That said, DW can interface with a php server if you have one installed, either on your computer, or on a remote host. To do this on your computer, you must have a server installed, including the php processor. If on Windows (which is the only system I'm familiar with), you would need to install an apache server, a php processor, and (if you expect to use a database) MySQL. These are all freely available, but can be difficult to install. I suggest you download Sokkit (http://sokkit.net) to install such a system on your Windows machine. It costs about $20, but I think it's worth it for the comparative ease of installation -- especially if you're not familiar with apache servers.

In order for DW to be able to use the server, you set up a testing server in DW. This is done on the Define Sites dailog. If you have installed the server on your local computer, you specify the localhost server. If you want to test using a remote host (for example, the hosting service where you will ultimately publish your site) you indicate the remote host for your testing server and DW will temporarily upload the page you are working on to that host to show the page in Live Data or Testing view.

Tom M.