Syntax Coloring for PHP in HTML Files

I'd like consistent syntax color throughout my documents,
which can be CSS, HTML or PHP. However, when I write PHP code into
anything but a PHP document, it comes out in a single, or
dual-color format making it much less "pretty", and not nearly as
easy to read. HTML has CFM and ASP color options, but not PHP (and
I don't want to have to format the color twice in preferences
anyhow). I've tried grouping .html files in with the PHP/MySQL
color grouping in the DocumentTypes setting (Dreamweaver
8/Configuration/DocumentTypes), which works, but results in a crash
each time I do anything but look at a document.
Anyone experience this behavior, or better yet, have a
solution to make Dreamwever's syntax color consistent within
itself?
BWT, this refers to Dreamweaver 8.0.2, Mac OS X 10.4.7. And
the rest of the Studio is installed as well.

jasonkenison wrote:
> I'd like consistent syntax color throughout my
documents, which can be CSS,
> HTML or PHP. However, when I write PHP code into
anything but a PHP document,
> it comes out in a single, or dual-color format making it
much less "pretty",
> and not nearly as easy to read.
Follow this link (watch the wrap), and scroll down to Randy
Edmunds' answer:
http://groups.google.com/group/macromedia.dreamweaver/browse_thread/thread/a60b556f59869a8 6/666ff112459275ec?lnk=gst&q=php+html+color&rnum=2#666ff112459275ec
He gives the details for Windows, but you should be able to
find the
correct file easily enough on a Mac.
David Powers
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "Foundation PHP 5 for Flash" (friends of ED)
http://foundationphp.com/

Similar Messages

  • Typographic extensions for UltraEdit-32: AFDKO and TTX syntax coloring for OpenType developers

    I have just made available for free the "Typographic extensions for UltraEdit-32" that allow syntax coloring for OpenType Layout feature definitions in FontLab-compatible AFDKO/FEA syntax and for TTX files:
    http://www.twardoch.com/adam/about.php?pt=sft
    Regards,
    Adam Twardoch

    Adam,
    Thanks for your continuous contribution to the development of Opentype. This pack is great.
    Jordi

  • External editor used for CSS but not for PHP or HTML - why?

    I've successfully configured Dreamweaver CS6 (trial) Mac to launch Sublime Text 2 when I double-click .css, js or .txt files in the Files panel. However, Dreamweaver refuses to open my .php or .html files in Sublime Text 2 - it always opens them within Dreamweaver.
    Any thoughts how to overcome this? It's very frustrating.
    Thanks!

    Hi Sudarshan,
    I currently am on a Mac using Interarchy and BBEdit. In my new job they use Dreamweaver on PCs. I've tried Dreamweaver's code editor and it is clunky and dated. I won't be able to use BBEdit on the PC and by all accounts Sublime Text 2 looks like a good alternative and it is also available for Mac so I can have a consistent editing environment when working from home.
    I have already tried what you recommended but it did not work. I will set back to the original settings and try again. I might try uninstalling/reinstalling.
    Thanks for replying,
    Adrian

  • I can not open files in my jZIP folders, they are either .PHP or html files what program do I use or how do I open them... Doug

    Hi I have download files using jZIP and then I can't find a program that will open them... they are .PHP and .html file extensions... what do I do.. Doug

    Hello ,
    Dear friend ''''' .PHP ''''' files are a server side pages or scripts it needs a server to run on it or to be executed , so you will have to install something like apache server you will find a great application that enables your system to work as a localhost server
    >> http://download.cnet.com/XAMPP/3000-10248_4-10703782.html
    but HTML file can easily opened by any browser like Firefox or IE
    also if you need to edit the content of their code you will have to obtain a code editor like Notebad++
    >>http://download.cnet.com/Notepad/3000-2352_4-10327521.html
    thanks for your time i wish i could helped you.

  • Is there a workaround for exported Muse html files to render accurately when opened in DreamWeaver d

    Is there a workaround for exported Muse html files to render accurately when opened in DreamWeaver design view?

    Have a look at this thread that should answer your query - http://forums.adobe.com/message/5231996.
    Thanks,
    Vinayak

  • How do I restore my preferred icon for .htm and .html files? search keyword axolotl

    When I made Firefox 3.6.2 my default browser, it changed the icons for my .htm & .html files to the fox&globe symbol - how do I change back to my old red dragon symbol? Folder options doesn't work, the icon for the file type changes in folder options, but has no effect on the icon displayed by Windows XP Explorer. Changing registry entries for DefaultIcon from ...\firefox.exe,1 to ....\mozilla.ico also failed, the WxExplorer icons changed to a generic symbol. Thanks, [email protected]
    search keyword axolotl

    With the help of information from user, ptressel, in [https://support.mozilla.org/en-US/questions/1032154#answer-673322 a post here about the existence of sessionstore.js when version 33 was released], I was able to easily recover my tabs and tab groups as follows:
    # close Firefox and, perhaps, allow a few seconds (30s?) for any final closing of files;
    # check to see if you have a sessionstore.js file in your profile folder, named like the one I documented in my original post above;
    # if it is not timestamped prior to the discovery of your problem, open the sessionstore-backups folder;
    # check if the recovery.js file is suitably timestamped and, if not, the recovery.bak.
    # At this point, you are likely to find that none of them are prior to your problem occuring. If so, open your backups of this folder and go through steps 2-4 to find a file prior to your problem occuring.
    # When you find a file, copy it to the root of your current profile folder and name it, "sessionstore.js"
    # Open Firefox. Mine opened up as desired.
    This is a Windows solution. Sorry I can't comment on other platforms, but I'd bet that as this is just a file copy and renaming, it is likely the same.
    For Windows users, you may find you need to sign out and login as an administrator in order to access the backups. You need not logoff your standard account, but do have Firefox closed as described above.
    Hope that helps.

  • Dumb PHP ? How do I use PHP in .html files.[solved]

    I've googled but I just seem to be missing it.
    Could someone please point me to documentation or tell me what/how do I enable the Apache server to process inline php in .html files?
    Last edited by FeatherMonkey (2008-03-25 16:51:21)

    http://www.desilva.biz/php/phpinhtml.html
    Instead of using htaccess, you can just change httpd.conf.
    Last edited by lucke (2008-03-25 16:02:56)

  • Why does Dreamweaver upload a blank page when i "put" a .php or .html file that I just edited. It's

    Why does Dreamweaver upload a blank page when i "put" a .php or .html file that I just edited. It's like Dreamweaver isn't putting the complete file. So when i check my work (refresh the page), it is now blank. This happens about 50 percent of the time and can occur with any of the websites I maintain. (If I pull out my macbookpro, i can edit and upload the page, but the screen is smaller and i would rather be at my desktop). I am using CS5 on a MacPro, operating system 10.7.5.

    I've never heard of that type of error before. If it were happening to me, here are a few things I would do...
    Verify it's DW
         Download Filezilla (free and very nice in reality) and make sure it uploads correctly from there to rule out connection issues
    Rebuild Site Cache
         From the Files window of your site, click the menu and go to Site > Recreate Site Cache
    Delete DW File Cache
         If the above does nothing, I'd kill my DW Cache File: http://forums.adobe.com/thread/494811
    Uninstall, clean, reinstall
         Uninstall the program, use the cleaner tool here: http://www.adobe.com/support/contact/cscleanertool.html to kill everything (Adobe leaves behind things that are picked up again in a normal uninstall/reinstall) then reinstall it.

  • 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 "Insert > PHP Objects" option from
    the insert menu.
    I'd like to find a way to get Dreamweaver to treat the PHP
    code in these files 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" <[email protected]> wrote in
    message
    news:gnsbfg$l7h$[email protected]..
    > 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.
    http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_16410&sliceId=1
    Massimo Foti, web-programmer for hire
    Tools for ColdFusion, JavaScript and Dreamweaver:
    http://www.massimocorner.com

  • 3.0EA1: syntax colors for reserved words and a shortcut for compile

    Hello,
    only two notes/questions:
    1. If syntax coloring is enabled, do you get your information about the words from V$RESERVED_WORDS? Is it possible for you to enhance these reserverd words (for example from a separate file) to take care of the following datatypes not defined in V$RESERVED_WORDS (especially the pl/sql-types)?:
    any types: anydata, anydataset, anytype
    xml types: uritype
    spatial types: sdo_geometry, sdo_georaster, ...
    media types: ordaudio, ordimage, ...
    pl/sql types: pls_integer, binary_integer, simple_integer, boolean
    2. Is it possible to get a shortcut for compiling? There are so many shortcuts defined, but when you write code you have to take the mouse and klick on the toolbar to compile/compile for debug (or do i miss the entry in the preferences?).
    Thank you
    Markus

    I forwarded this on the the correct developers they should reply here shortly.
    Syme

  • DW CS5 - PHP in HTML file - no display in DW live view

    Have DW CS5, Local IIS 7 (Win 7 64x) testing server (Server Model: PHP MySQL) set up and working. External browsers render .html files with PHP fine (URL=http://localhost/testphp.html), DW Live View will not parse/display the PHP with ".html" extension. No ".htaccess" file, DW PHP Tag Library has all PHP "Used In:" boxes checked. Example:
    Example 1
    File name: testphp.php
    <html>
    <body>
    <h1>Hello There</h1>
    <script language="php">
    echo "Hello World";
    </script>
    </body>
    </html>
    DW Live View and external browser URL: http://localhost/testphp.php:
    Hello There
    Hello World
    Example 2
    File name: testphp.html (same content as above, just filename extension changed)
    <html>
    <body>
    <h1>Hello There</h1>
    <script language="php">
    echo "Hello World";
    </script>
    </body>
    </html>
    DW Live View:
    Hello There
    external browser URL: http://localhost/testphp.html:
    Hello There
    Hello World
    How to configure DW CS5 to display PHP in DW Live View with file extension= ".html"?
    Thanks in advance, have spent 2 days trying to accomplish!
    Steve

    File name: testphp.php 
    <html>
    <body>
    <h1>Hello There</h1>
    <script language="php">
    echo "Hello World";
    </script>
    </body>
    </html>
    This is not PHP code
    The red code part should read as to be classified as PHP script
    <?php echo "Hello World"; ?>
    File name: testphp.html (same content as above, just filename extension changed) 
    <html>
    <body>
    <h1>Hello There</h1>
    <script language="php">
    echo "Hello World";
    </script>
    </body>
    </html>
    Apart from the same mistake as above, this file will not be recognised as containing PHP without the PHP extension. You can setup the server to accept HTML and to interpret same as PHP, but I would not recommend this.
    DW Live View:
    Hello There
    external browser URL: http://localhost/testphp.html:
    Hello There
    This is amazing! With the code above? If you hadn't told me I would not have believed it. I tried it on my humble setup and you are correct. It works using the PHP file but not the HTML file. It doesn't matter, it is still not correct.
    How to configure DW CS5 to display PHP in DW Live View with file extension= ".html"?
    It is not up to DW to determine, it is the PHP server that determines whether PHP in an HTML file will be shown. Have a look here http://php.about.com/od/advancedphp/p/html_php.htm .Once again, I do not recommend this
    I hope this helps.
    Ben

  • ActiveX bypass in Outlook 2010 & 2013 for specially crafted html file

    Whilst testing an IE exploit to see if a Windows system was patched or vulnerable, I noticed a difference in the way Outlook behaves compared to Internet Explorer when opening a .html file containing ActiveX code.
    POC system is Windows 7 Version 6.1.7601 Service Pack 1 Build 7601 using either Outlook 2010 or Outlook 2013.
    Use case 1. If I open the .html file in the OS, the default program is IE and I am prompted that ActiveX is restricted in the lovely yellow pop up banner, before I click "Allow Blocked Content" and pwn the machine and crash the browser and DEP
    kicks in to save the day.
    Use case 2. If I email the .html file to myself and open the email attachment from Outlook 2010 or 2013. I get the prompt from Outlook warning about "opening the attachment" which is pretty standard, but no warning in IE about ActiveX code
    and pwn the machine straight away as it would appear that the browser ActiveX controls are bypassed or just not there? DEP then kicks in to save the day again.
    Use case 3. Same as use case 2 except this time using Outlook.com as the email client. This email client provides little warning, the file download prompt asks "do I want to open or download the file", I click open and the file download
    runs the file by opening up another browser tab without prompting any ActiveX warnings and bang! IE has to recover from a crash.
    Does anyone know why use case 2 and 3 prevent the browser from prompting for ActiveX or bypass the browser from prompting for ActiveX and seemingly the user accepting the opening of an attachment in Outlook or the downloading of the file from Outlook.com
    is then a gateway to having the exploit run in the browser?
    Finally, I appreciate that all the above controls are pretty weak and so probably no need for a big essay like this and we're all weary of users opening mysterious attachments, but I was intrigued by the disparity in the user experience and ActiveX.
    Any takers?

    Hi,
    In case 3, what does it mean by "using Outlook.com as the email client"? Did you configure an Outlook.com account in Outlook client, or use Outlook.com account on web?
    Please open Outlook, go to FILE -> Options -> Trust Center -> Trust Center Settings -> Automatic Download -> Uncheck "Permit downloads from Web sites in this security zone: Trusted Zone" -> OK. I'm not sure if this helps but you can have
    a try.
    Regards,
    Melon Chen
    TechNet Community Support

  • [SOLVED] VIM: different syntax highlighting for new vs existing file

    I've had this minor nagging issue for a while that I've been trying to figure out, but I just don't know where to look.
    It is most obvious with LaTeX files (*.tex).  When I create a new file with "vim file.tex" it is recognized as a latex file and I get syntax highlighting, but it seems odd, or off.  When I close then reopen the same file, it gets "propper" syntax highlighting.
    I gather that this must be because of the two different mechanisms for matching the syntax type: filename versus content.  When the file is new, vim only uses the extension.  Once there is a latex comand (e.g., "\documentclass{article}") it recognizes it as something else and the highlighting style is different.
    It turns out just by actually elaborating exactly what the problem was, I was able to find the solution.  I looked for how vim recognizes the files, and found two relevant lines in /usr/share/vim/vim73/filetype.vim on lines 2093 and 2094.  Apparently the .tex filetype is not the same as .latex and others.  I changed it so it was, and I got the desired behavior.
    I thought about just not posting this - but it may be useful for others.

    You're right about it being overridden.  This change should be able to be placed in ~/.vimrc though.
    Well  that was foolish - I should have read the comments right below in that file.  It says exactly how to set it in vimrc.  I've now added the following to my ~/.vimrc and this is completely solved without modifying the /usr/... file.
    let g:tex_flavor = "tex"
    Last edited by Trilby (2013-03-29 16:11:26)

  • How to save jTextPane colored format save to html file?

    ok, I've been able to implement my stuffs using such example:
    http://www.java2s.com/Code/Java/Swing-JFC/JTextPaneStylesExample2.htm
    so now that my jTextPane has colored format. How do I allow user to save this to a file? Not a plain text file but a formated file such as html or doc?

    Use HTMLEditorKit's write() method and pass your document in the method.
    Regards,
    Stas

  • Use PHP code coloring in HTML files

    In Dreamweaver CS3, what changes do I need to make to get PHP
    code coloring show up in .html files?

    robot88888888,
    First, copy this file from the app config folder:
    C:\Program Files\Adobe\Adobe Dreamweaver
    CS3\configuration\CodeColoring\PHP.xml
    To the user config folder:
    C:\Documents and Settings\[username]\Application
    Data\Adobe\Dreamweaver
    9\Configuration\CodeColoring\
    Then open PHP.xml in your favorite editor. You need to add
    HTML to all
    of the doctype lists Change every occurrence of this:
    doctypes="PHP_MySQL"
    to be:
    doctypes="PHP_MySQL,HTML"
    Save and close. If DW is running, close it. Now restart DW.
    HTH,
    Randy
    > In Dreamweaver CS3, what changes do I need to make to
    get PHP code coloring show up in .html files?

Maybe you are looking for

  • Issue in ECC 6.0 Regarding Purchase Order

    Hi all, i have an issue with print preview in ECC 6.0. i CAN SEE PRINT PREVIEW IF I HAVE MEDIUM AS PRINT OUTPUT , IF I DON'T HAVE HAVE MEDIUM AS PRINT OUTPUT , I AM GETTING AN ERROR SAYING Error in OPEN_FORM for document I guess it should be independ

  • Is there any specific docs for using iPlanet v5.1 as MTA only rather than as a MTA/IMAP server?

    We currently use PMDF on a couple of dedicated boxes as MTA's for our site. Licensing for iPlanet v5 is a little more favorable and a number of the former PMDF developers now work for iPlanet/Sun and these folks were great to work with. I'm reading t

  • Can't start epiphany. Missing library?

    Can't start epipihany. I'm just getting the message : epiphany: error while loading shared libraries: libicui18n.so.38: cannot open shared object file: No such file or directory Last edited by rocknrolf77 (2008-10-15 05:27:05)

  • Converting purchase req. to purchase order.

    Hi, how converting purchase reqiusitions to purchase order? I have a lot of purchase req. to convert How can I do that? Best regards

  • Trying to load data but only zeros are being loaded

    Hello people, I'm facing the following situation I'm trying to load data into a Planning application using a rule file and my Data source type is SQL. The problem is that all data is being replaced with zeros, so I only get zeros in the database. I'm