Ask a Question related to Adobe Dreamweaver & Contribute, Design and Development.
-
spiderjade #1
Extension to Force DW to Recognize PHP in HTML files
Hi there,
I've got several sites that use PHP code blocks embedded within plain .html
files. It's an apache server and I simply use AddHandler
application/x-httpd-php in the .htaccess file to tell the server to parse them
for PHP.
It works fine for these sites where we don't want to change URLs by modifying
filenames.
However, Dreamweaver doesn't treat these PHP code blocks as PHP (with one
exception, which I'll get to). Instead, it displays the code block as plain
text, without code coloring or code hints. It also doesn't provide the "InsertI'd like to find a way to get Dreamweaver to treat the PHP code in these files> PHP Objects" option from the insert menu.
properly, but I haven't found an extension that could do it.
The one exception I mentioned above is with PHP includes. When I have a PHP
include, Dreamweaver displays it as "Server Markup" in the properties box,
without the filename selection or edit properties you get with an actual .php
file.
However, the "related files" bar does correctly show the included file (I'm
using CS4), so on some level, DW seems to know that it is a PHP code block.
I'm hoping this is either an existing extension that I wasn't able to find
when I searched the libray, or that it's a functionality I could enable myself
without an extension if I'm given the right direction to look.
Anybody have any thoughts on this?
Thanks in advance,
Jade
spiderjade Guest
-
Windows doesnt recognize flash (.swf) files ??
Hi Ive been having a problem for about a week opening flash files ( I have some flash games saved that will not open) they are all .swf files and if... -
DW MX Doesn't Recognize FW MX 2004 HTML Files For Import
Hi, I'm trying out Fireworks MX 2004 and ran across this problem. I opened a navbar PNG file (w/pop-up menus) in FW MX 2004 that had originally... -
converting MS doc formatting to html that Flash can recognize
I've got an MS world doc that has simple formatting in it (i.e. bold, italic) that I want to bring into flash. My solution is: a) save as html... -
can i force a shockwave file to load before html?
help, i'm looking for a way to force the browser to load a shockwave file before html. Well my problem is that I have a shockwave file on a... -
Way To Have FW Open & Still Recognize Newly Added Files?
Ugh... The only way I can get FW to see or acknowledge the presence of a newly added file in a directory that's been opened during the current... -
Massimo Foti #2
Re: Extension to Force DW to Recognize PHP in HTML files
"spiderjade" <webforumsuser@macromedia.com> wrote in message
news:gnsbfg$l7h$1@forums.macromedia.com...[url]http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_16410&sliceId=1[/url]> I'm hoping this is either an existing extension that I wasn't able to find
> when I searched the libray, or that it's a functionality I could enable
> myself
> without an extension if I'm given the right direction to look.
--
----------------------------
Massimo Foti, web-programmer for hire
Tools for ColdFusion, JavaScript and Dreamweaver:
[url]http://www.massimocorner.com[/url]
----------------------------
Massimo Foti Guest
-
spiderjade #3
Re: Extension to Force DW to Recognize PHP in HTML files
Hi Massimo,
Thanks for that. I used the article's info to change the filetype association so that .htm and .html files are treated as PHP.
That seems to do the trick, so thanks again.
spiderjade Guest
-
spiderjade #4
Re: Extension to Force DW to Recognize PHP in HTML files
Just a quick update on this issue.
After making that change as Massimo suggested, I thought I had solved the
issue.
However, once I started actually working in Dreamweaver I started running into
"Runtime Errors" so I had tried reverting to my backed up copy of
MMDocumentTypes.xml and that stopped the Runtime Errors.
So, I'm back where I started from.
spiderjade Guest
-
dan@hoppernet.org #5
Re: Extension to Force DW to Recognize PHP in HTML files
I had a similar problem editing 'PHP' files.
Installed 'MAMP' (local server software).
(Also 'MAMP PRO' is available for windoz boxes.)
Now creating, editing, and proofing PHP files is as easy as htm/html.
Dan H.
........................
On 2/23/09 4:40 PM, in article gnv53u$8ko$1@forums.macromedia.com,
"spiderjade" <webforumsuser@macromedia.com> wrote:
> Just a quick update on this issue.
>
> After making that change as Massimo suggested, I thought I had solved the
> issue.
>
> However, once I started actually working in Dreamweaver I started running
> into
> "Runtime Errors" so I had tried reverting to my backed up copy of
> MMDocumentTypes.xml and that stopped the Runtime Errors.
>
> So, I'm back where I started from.
>dan@hoppernet.org Guest
-
spiderjade #6
Re: Extension to Force DW to Recognize PHP in HTML files
Hi Dan,
Thanks for the reply, but I think you missed my point.
I don't have any problem creating, editing or proofing PHP files.
My localhost server works just fine for viewing them and Dreamweaver obviously
works properly with them.
My problem is with .html files, not .php files. I need dreamweaver to
recognize PHP code when it is embedded in .html files.
Thanks anyway.
spiderjade Guest
-
Julian Spite #7
Re: Extension to Force DW to Recognize PHP in HTML files
Instead of naming your file with a .html extension, name it with a .php
extension and Dreamweaver will now apply the color you are looking for. It
will have to have the .php extension to be processed by your php server anyway.
Julian Spite Guest
-
spiderjade #8
Re: Extension to Force DW to Recognize PHP in HTML files
Hi Julian,
Thanks for the post, but I guess you didn't read my original post.
It IS possible to parse php code without the .php extension. If you're on an
apache server, you just add a handler in the .htaccess file.
And changing the filenames from .html to .php is an obvious solution that I
already said I don't want to do (for a variety of reasons).
So, as an update, I've been going back and forth with Dreamweaver support on
this issue and they're still trying to help. I'll keep you posted if and when a
solution comes along.
Jade
spiderjade Guest
-
FredTzav #9
Re: Extension to Force DW to Recognize PHP in HTML files
Hello,
Not sure if this works but you can try editing this file :
Adobe\YourDreamweaverFolder\configuration\Document Types
\MMDocumentTypes.xml
Look for documenttype id="PHP_MySQL"
Just update the winfileextension and/or macfileextension with your
extensions.
fred
[url]http://www.tzav.fr[/url]
FredTzav Guest



Reply With Quote

