Syntax higlighting (php inside html docs)

Hi.
Instead of .php I use .html to parse my php files. But DW
shows the syntax highlighting of html even between <?php ?>.
This is pretty uncomfortable when writing php. Is there a way I can
render the syntax correctly? Perhabs there is an extension (I can't
find anything).
Hope for some help.
Thanks.

suntrop wrote:
> Is there a way I can render the syntax correctly?
Yes. I haven't done it myself, but I believe the following
technote
contains the relevant information:
http://www.adobe.com/go/tn_16410
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of
ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/

Similar Messages

  • Jump to a Named Anchor when loading an HTML doc

    I have a CollapsiblePanel with a Content Link to a Named
    Anchor in info.html and I thought I could use loadURL() to load the
    page into the Div "thetext" but it does not work. Can Spry Jump to
    a Named Anchor when it loads an HTML doc?
    onClick:
    Spry.Utils.updateContent('thetext',
    '/information2.php#Insurance')
    And I also tried:
    Spry.Utils.loadURL('thetext', '/information2.php#Insurance')
    The Head:
    <script src="SpryAssets/SpryCollapsiblePanel.js"
    type="text/javascript"></script>
    <link href="SpryAssets/SpryCollapsiblePanel.css"
    rel="stylesheet" type="text/css" />
    <script language="JavaScript" type="text/javascript"
    src="Spry_P1_6_10-01/includes/SpryData.js"></script>
    <script language="JavaScript" type="text/javascript"
    src="Spry_P1_6_10-01/includes/SpryEffects.js"></script>

    On 08 Oct 2007 in macromedia.dreamweaver, antonioconte wrote:
    > Does anyone know if and how its possible to jump to a
    named anchor?
    > I need to use the behavior panel to call a page into a
    pop up and
    > jump to an anchor too - is this possible?
    Sure - just make the link to the anchor:
    <a
    href="page.php#anchor"
    onclick="popupscript('page.php#anchor');return false;">
    Open my popup window</a>
    Making the link attribute (href=) the same as the popup
    window means that
    people who are visiting your site with javascript turned off
    will also
    get the information from the page. The 'return false' in the
    onclick
    event means that the href won't fire if javascript is turned
    on.
    Joe Makowiec
    http://makowiec.net/
    Email:
    http://makowiec.net/contact.php

  • 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

  • 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)

  • XML parser to parse XML inside HTML file

    Hi,
    I wish to know is there any other parsers apart from JAXP to parse xml content present inside HTML file. For example,
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title></title>
    </head>
    <body>
    <form id="j_id_jsp_1394907664_1" name="j_id_jsp_1394907664_1" method="post" action="/msaiphoneportal1.1c/pages/xmlchech.faces;jsessionid=5666F0E1CF0E44B978940F021012AA41" enctype="application/x-www-form-urlencoded">
    <input type="hidden" name="j_id_jsp_1394907664_1" value="j_id_jsp_1394907664_1" />
    <?xml version="1.0" encoding="UTF-8"?>
    <hospital>
    <Users>
    <User id="1" password="x" type="staff" username="x"/>
    <User id="2" password="y" type="staff" username="y"/>
    <User id="3" password="z" type="staff" username="z"/>
    </Users>
    <Survey/>
    <Patients>staaatus</Patients>
    </hospital>
    <input type="hidden" name="j_id_jsp_1394907664_1:j_id_jsp_1394907664_2" /><input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="-4298162632826268059:-1507671971163298623" autocomplete="off" />
    </form>
    </body>
    </html>
    I need to read the XML content inside. Is there any way please let me know
    Edited by: DHURAI on Jul 22, 2010 12:59 AM

    DHURAI wrote:
    while reading, we can fetch the starting of XML through <?xml> tag, but how we know the ending of the XML as it seems to be dynamic.1) Extract the document root element which follows the <?xml ... ?>
    2) From this root element , construct the associated root element terminal by inserting a / after the <.
    3) Search for the terminal.
    If the root name can also be the name of an enclosed element then you will have to count the number of terminals.

  • Dreamweaver can't preview html doc in Firefox

    When I create an html doc in Dreamweaver and I go to the option Preview in Browser and select Firefox, nothing happens. It is supposed to open a Firefox windows and preview the doc there, but it won't.

    Just DL'd Firefox13 and it still seems the same!
    Out of date or not... It bugged me so here's my answer(MAC), download Firefox 3.5.8 from Mozilla old versions(easy search) and rename it to something relevant, this is your browser for Dreamweaver previews. Download the lastest FF version for general browsing. Edit your dreamweaver browser list to use 3.5.8 - It's a workaround but simply fire up 3.5.8 during site editing and it's plain sailing.
    '''Poor-show Mozilla.'''

  • Php mysql html on your server application

    hello
    I can work with example websites
    php mysql html on your server application
    ouy have to install, php mysql apache and phpmyadmin on my bakbookpro
    if your server does not do what I Querro please tell me
    and I instalho manually
    if it does I'll use it qurro
    however pressisamos people who can use that build here
    I do not have a whole life to stay behind the computer
    and if your server can not work rebuild from scratch
    do the work with php and html
    because my client wants the **** form in php

    you mean its got <TEXT LEADING FORMATS blah blah >
    yea, turn html on on the text box that ur sending to php.
    or off, well whatever it is now, do the oposite, lol.

  • Firefox links that worked yesterday don't work today! Even html docs fail! Maybe a bad TSR is running. Big problem.

    Both HTML docs and links dragged from Firefox now fail -- error msg: THERE WAS A PROBLEM SENDING THE COMMAND TO THE PROGRAM -- last night, I had no problem: both types worked fine -- I never shut my HP laptop down -- now I'm afraid to -- I won't even close my Firefox browser -- maybe a TSR is continuing to wreak havoc with my system -- please help soon.

    rj_oregon wrote:
    If you like email me out-of-band and I can send you a full sample .txt file of "hello world" that takes 3K in plain text, 256KByte in rich-text, most of it injected.
    If it looks anything like the sample here, that's unnecessary:
                             Test_Email_Adblock_enabled.txt          
    If what you see is substantially different, though, I'd be interested in seeing it. (I can't e-mail you, though, as I don't know your e-mail address. You can find mine, though, by looking at the contact link at the bottom of any page on my site, listed in my profile here.)
    This is not a feature in adblock, I view it as a bug.
    I agree, it should not be doing that.
    My suspicion is that AdBlock works by adding this code to every page you view, thus rendering the advertising elements invisible. However, in the case of OWA, it must be inserting that code in a bad place, where it shows up in the message. Mail servers will be prone to rejecting such a message, probably because some of the strings that code uses to identify these ads might look malicious. There's nothing that I can see in that code that's actually malicious, though... just a bunch of CSS conditions that make matching elements invisible.

  • Search for strings inside html tags ?

    Is there any way to get Spotlight to find search strings inside html documents? One example is I want to find any file that includes a certain alt=" " string inside an img src tag.
    Spotlight does not seem to include anything inside html tags in it's search, as far as I can tell.
    Am I missing something? Is there something I need to do?
    Thanks for any ideas,
    KarenD
    G5   Mac OS X (10.4.4)  
    G5   Mac OS X (10.3.5)  

    Very strange--it does find text inside the html files, but indeed does not seem to have text that is in the file but only appears within a tag. The solution is EasyFind by Christian Grunenberg:
    http://www.grunenberg.com
    You can do a content search on files in a particular folder, which I recommend since it does a brute force search and can take awhile if it has to search everything.
    Francine
    Schwieder

  • Sub-Tabs attached to HTML docs in CS4

    Anyone else find this to be true as well?
    Do yourself a favor and don't use the sub-tabs under a html
    doc to edit CSS. They dont update when you have the CSS file in its
    own tab and save. It makes it incredibly confusing switching
    back-n-forth between the HTML file and the CSS file.
    The only thing it is useful for is quickly seeing all of the
    linked files to your html doc, not for editing those files.

    Hi Tyler,
    Yes, that's correct. The File > Save All command was added
    to help this
    case.
    HTH,
    Randy
    > Anyone else find this to be true as well?
    >
    > Do yourself a favor and don't use the sub-tabs under a
    html doc to edit CSS.
    > They dont update when you have the CSS file in its own
    tab and save. It makes
    > it incredibly confusing switching back-n-forth between
    the HTML file and the
    > CSS file.
    >
    > The only thing it is useful for is quickly seeing all of
    the linked files to
    > your html doc, not for editing those files.
    >

  • 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

  • Stretch height in panelStretchLayout dont work inside html table?

    I need to put panelsplitter inside html table and i write something like this:
    <table width="100%" cellpadding="0" cellspacing="0" border="0" style="position:absolute; padding:0px 30px;">
    <tr><td>XXXX</td><td>yyyyy</td></tr>
    <tr><td>
    <af:panelStretchLayout id="pt_psl1" styleClass="AFStretchWidth">
    <f:facet name="center">
    <af:panelSplitter splitterPosition="165" id="pt_ps1"
    inlineStyle="background-color:White; padding:0px 15px;"
    styleClass="AFStretchWidth">
    <f:facet name="first">
    <af:facetRef facetName="1"/>
    </f:facet>
    </af:panelSplitter>
    </f:facet>
    </af:panelStretchLayout>
    </td></tr>
    </table>
    But panel splitter dont stretch inside table componenet... there is a way to make it work?
    thnxs

    Don't mix HTML tags with ADF Faces tags.
    Instead you should use the ADF layout components to achieve what you are looking for.
    Use a panelStretchLayout and at the top facet put the xxxx yyyy in output text components.
    then in the center use the panelSplitter.

  • New to Servlet - Existing html doc

    I created a new servlet and have an existing html doc. How do I connect the doc to the servlet so that it will send request to the servlet.
    In the html file I have the following code.
    <form action = "/servlet/TEDServicesDatabrowserServlet" method = "post" name ="myName">
    I place the follow in the web.xml file
    <servlet>
    <servlet-name>TEDServicesDatabrowserServlet</servlet-name>
    <servlet-class>mil.navy.nrlssc.dmap.TEDServices.TEDSServer.TEDServicesDatabrowserServlet</servlet-class>
    <init-param>
         <param-name>WorkingDirectory</param-name>
    <param-value>C:\tedsservletworkingdirectory</param-value>
    </init-param>
    <init-param>
         <param-name>ScratchDirectory</param-name>
         <param-value>c:\apache\htdocs\mapb</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
    </servlet>
    It is not responsing to any request I make. What to do!

    Hello
    A sample web.xml file is attached for your reference.
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app id="WebApp">
         <display-name>Web</display-name>
         <filter>
              <filter-name>RedirectFilter</filter-name>
              <display-name>RedirectFilter</display-name>
              <filter-class>test.RedirectFilter</filter-class>
         </filter>
         <filter-mapping>
              <filter-name>RedirectFilter</filter-name>
              <url-pattern>/ResourceLookupServlet</url-pattern>
         </filter-mapping>
         <filter-mapping>
              <filter-name>RedirectFilter</filter-name>
              <servlet-name>ResourceLookupServlet</servlet-name>
         </filter-mapping>
         <servlet>
              <servlet-name>action</servlet-name>
              <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
              <init-param>
                   <param-name>config</param-name>
                   <param-value>WEB-INF/struts-config.xml</param-value>
              </init-param>
              <init-param>
                   <param-name>debug</param-name>
                   <param-value>2</param-value>
              </init-param>
              <init-param>
                   <param-name>detail</param-name>
                   <param-value>2</param-value>
              </init-param>
              <init-param>
                   <param-name>validate</param-name>
                   <param-value>true</param-value>
              </init-param>
              <load-on-startup>2</load-on-startup>
         </servlet>
         <servlet>
              <servlet-name>ResourceLookupServlet</servlet-name>
              <display-name>ResourceLookupServlet</display-name>
              <servlet-class>test.ResourceLookupServlet</servlet-class>
         </servlet>
         <servlet-mapping>
              <servlet-name>action</servlet-name>
              <url-pattern>*.do</url-pattern>
         </servlet-mapping>
         <servlet-mapping>
              <servlet-name>ResourceLookupServlet</servlet-name>
              <url-pattern>/ResourceLookupServlet</url-pattern>
         </servlet-mapping>
         <welcome-file-list>
              <welcome-file>index.html</welcome-file>
              <welcome-file>index.htm</welcome-file>
              <welcome-file>index.jsp</welcome-file>
              <welcome-file>default.html</welcome-file>
              <welcome-file>default.htm</welcome-file>
              <welcome-file>default.jsp</welcome-file>
         </welcome-file-list>
         <taglib>
              <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
              <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
         </taglib>
         <taglib>
              <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
              <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
         </taglib>
         <taglib>
              <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
              <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
         </taglib>
         <taglib>
              <taglib-uri>/WEB-INF/struts-nested.tld</taglib-uri>
              <taglib-location>/WEB-INF/struts-nested.tld</taglib-location>
         </taglib>
         <taglib>
              <taglib-uri>/WEB-INF/struts-template.tld</taglib-uri>
              <taglib-location>/WEB-INF/struts-template.tld</taglib-location>
         </taglib>
         <taglib>
              <taglib-uri>/WEB-INF/struts-tiles.tld</taglib-uri>
              <taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
         </taglib>
    </web-app>
    You are missing the servlet mapping tag. The servlet mapping tag maps the servlet name with a url pattern, so that the web server can understand which servlet to call.
    In your html form specify this url-mapping
    HTH
    VJ

  • DW crashes when I use PHP and HTML

    Hi, I need to use PHP with DW to validate a form.
    However, when I use PHP with HTML DW crashes. I use a PHP
    script to to select the correct radio button when the form is
    submitted (see below).
    It works fine in the browsers and I can even edit in Notepad.
    I am not sure how to solve this - I altered the DTD from
    strict to transitional (it didn't work). I am using the latest
    version of DW CS3.
    Any ideas?
    <dt>How did you find out about the site?</dt>
    <dd>
    <label for="how_did_you_find_out_about_the_site1">
    <input name="how_did_you_find_out_about_the_site"
    id="how_did_you_find_out_about_the_site1" type="radio"
    value="Link_from_another site" <?php echo
    ($_POST["how_did_you_find_out_about_the_site"] ==
    "Link_from_another site") ? "checked=checked" : "";?> />
    Link from another site</label>
    </dd>
    <dd>
    <label for="how_did_you_find_out_about_the_site2">
    <input name="how_did_you_find_out_about_the_site"
    id="how_did_you_find_out_about_the_site2" type="radio"
    value="Read_about_it_in a_booklet_or_card" <?php echo
    ($_POST["how_did_you_find_out_about_the_site"] == "Read_about_it_in
    a_booklet_or_card") ? "checked=checked" : "";?> />
    Read about it in a booklet/card</label>
    </dd>
    <dd>
    <label for="how_did_you_find_out_about_the_site3">
    <input name="how_did_you_find_out_about_the_site"
    id="how_did_you_find_out_about_the_site3" type="radio"
    value="Recommended_by_my tutor" <?php echo
    ($_POST["how_did_you_find_out_about_the_site"] ==
    "Recommended_by_my tutor") ? "checked=checked" : "";?> />
    Recommended</label>
    </dd>
    <dd>
    <label for="how_did_you_find_out_about_the_site4">
    <input name="how_did_you_find_out_about_the_site"
    id="how_did_you_find_out_about_the_site4" type="radio"
    value="Found_it_when_I_used_the_search" <?php echo
    ($_POST["how_did_you_find_out_about_the_site"] ==
    "Found_it_when_I_used_the_search") ? "checked=checked" : "";?>
    />
    Found it when I used the search</label>
    </dd>
    <dd>
    <label for="how_did_you_find_out_about_the_site5">
    <input name="how_did_you_find_out_about_the_site"
    id="how_did_you_find_out_about_the_site5" type="radio"
    value="Other" <?php echo
    ($_POST["how_did_you_find_out_about_the_site"] == "Other") ?
    "checked=checked" : "";?>/>
    Other</label>
    <label
    for="how_did_you_find_out_about_the_site6">(please specify)
    <input name="how_did_you_find_out_about_the_site_specify"
    id="how_did_you_find_out_about_the_site6" type="text"
    value="<?php echo ($_POST["how_did_you_find_out_about_the_site"]
    == "Other") ? $_POST["how_did_you_find_out_about_the_site_specify"]
    : "";?>"/>
    </label>
    </dd>

    Steve84 wrote:
    > Hi, I need to use PHP with DW to validate a form.
    >
    > However, when I use PHP with HTML DW crashes.
    http://www.adobe.com/go/kb402776
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS3" (friends of
    ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • 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.

Maybe you are looking for