View Full Version : Recognise PHTML files?

03-09-2005, 12:46 PM
Hi all,

I've inherited a website and have 'hooked' myself up to it using FTP in Dreamweaver, yet there are a number of PHTML documents that I can't open? Any ideas? I think I need to do something with the configuration file?

Would be greatly appreciated...

Thanks - James.

03-09-2005, 01:07 PM
Do you mean you can't open them at all, or you can't see the content in design view?
PHTML viles use php server-side scripting, and Dreamweaver does not "run" the php scripts, but you should be able to see and edit the code in code view.

You should, however, be able to see the plain HTML portions of the page in design view. If the entire page is php code, then you will not see much of anything, but if only a few parts of it are php, you can see the non-php parts.

To actually see the results of php processing, you need to serve your page from a server that supports php. This can be either a local or remote server. If you have a server on your local machine, or if you have access to a remote server that processes php, you can set it up as a testing server.

Tom M.

03-09-2005, 01:13 PM
We also have an article on this website describing how to successfully add the .phtml extension to Dreamweaver:
http://www.dreamweaverclub.com/dreamweaver-phtml-inc.php ('http://www.dreamweaverclub.com/dreamweaver-phtml-inc.php')

03-09-2005, 01:16 PM
Hi Tom.

Thanks for the help. I should have clarified. I mean that I can't open them at all. In the FILES window of Dreamweaver it displays the icon as 'unrecognised' if you know what I mean?

The pages are mostly HTML with bits of PHP inserted.

When I try and open the file in dreamweaver I get "Cannot find a valid editor for this extension type' . I think I need to kind of teach Dreamweaver that it CAN open this file or something...

Cheers - James.

03-09-2005, 01:17 PM
The link that someone has just posted is for Dreamweaver MX - I guess it works for MX 2004?


03-09-2005, 04:52 PM
Thanks domedia for the post on how to add extensions. I was going to suggest that he do that, but then I couldn't figure out how to do it. I'll try to remember that articla for when I need it.

03-10-2005, 12:54 PM
Pleased to say that it worked brilliantly aswell!

Jim Shady.

03-10-2005, 03:15 PM
That is great news Shady, now we know the article will solve this for DW4, MX and MX2004 :)