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

Similar Messages

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

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

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

  • Twitter Bootstrap not displaying correctly in Live View in DW CS4

    I am having a problem with Twitter Bootstrap templates not displaying correctly in Live View in Dreamweaver CS4. They look more correct with Live View turned off than on. When I turn Live View on, it looks as if it's not finding a style sheet or something, but they are all href'ed properly. Is there a way to fix this?

    Hi kooshetty,
    Did you preview the site in various browsers and check the display? You are using an older version of DW, and I am not sure if the Webkit engine supports bootstrap code.
    Thanks,
    Preran

  • 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

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

  • HTML file won't open in design view

    I've been asked to amend an existing website and so have
    retrieved a variety of necessary files.
    I thought it would just be a case of making the change and
    then putting the site back on the web but when I open the html file
    there is nothing showing in design view and only a limited amount
    of info in the code window.
    I'm working in CS3 (which I'm new to) so was wondering if I'm
    missing a trick, or has the person before me done something to stop
    others from editing their files? Also, I've noticed there are shtml
    files too which I have no problems opening.
    I'm a graphic design with limited Dreamweaver knowledge so if
    anyone can help I'd appreciate it!

    > I thought it would just be a case of making the change
    and then putting
    > the
    > site back on the web but when I open the html file there
    is nothing
    > showing in
    > design view and only a limited amount of info in the
    code window.
    This suggests that you are either looking at a page that is
    heavily invested
    in server scripting, or that contains so many coding errors
    that DW cannot
    make heads or tails of how to render it. Can you post a link
    to one of
    these pages?
    > or has the person before me done something to stop
    others from editing
    > their
    > files?
    This is not possible.
    > I'm a graphic design with limited Dreamweaver knowledge
    This could be serious trouble. I say that not because you
    have limited DW
    knowledge, but because you probably also have limited (zero?)
    HTML and CSS
    knowledge. Allowing someone with those credentials to edit a
    website is a
    train wreck waiting to happen.
    But let's start by looking at the pages you are trying to
    edit. Please post
    a link.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Appleby Vic" <[email protected]> wrote in
    message
    news:[email protected]...
    > I've been asked to amend an existing website and so have
    retrieved a
    > variety of
    > necessary files.
    > I thought it would just be a case of making the change
    and then putting
    > the
    > site back on the web but when I open the html file there
    is nothing
    > showing in
    > design view and only a limited amount of info in the
    code window.
    > I'm working in CS3 (which I'm new to) so was wondering
    if I'm missing a
    > trick,
    > or has the person before me done something to stop
    others from editing
    > their
    > files? Also, I've noticed there are shtml files too
    which I have no
    > problems
    > opening.
    > I'm a graphic design with limited Dreamweaver knowledge
    so if anyone can
    > help
    > I'd appreciate it!
    >

  • Fonts not displayed correctly in Live View Dreamweaver CS4

    I have a site that uses the Nuptial Script font.   Everything is displayed correctly in Design View and in IE and FireFox.
    But LiveView does not display the font correctly; in fact, the text with Nuptial Script is not readable in LIveView.    If I change the font from Nuptial Script to Arial (yuck) as a test, LiveVIew displays the pages correctly.   Other fonts like Vivaldi work in LIveVIew.  Nuptial Script does not work in LIveVIew.

    lilbear34 wrote:
    I have a site that uses the Nuptial Script font.   Everything is displayed correctly in Design View and in IE and FireFox.
    This is display correctly for you in any browser because you have the font installed on your system.  As far as I know, I don't have that script, so your page would not render as intended if I viewed it in either FFox or IE.
    You need to set up a font-family when defining a non-web-safe font, so that if someone doesn't have your first choice of font, they'll be able to see it in another of your choosing  (but needs to be web-safe).
    More about web-safe fonts and what they are here:
    Web Safe Fonts:
    http://www.ampsoft.net/webdesign-l/WindowsMacFonts.html
    Nadia
    Adobe® Community Expert : Dreamweaver
    http://www.perrelink.com.au
    Unique CSS Templates | Tutorials | SEO Articles
    http://www.DreamweaverResources.com
    http://twitter.com/nadiap

  • How to get generated HTML file to display in new window from FileDownloadActionListener?

    Hi,
    I am using Jdeveloper version 11.1.1.5.
    I have a use case where the user can produce a report upon the click of a command button. They can generate 3 types of reports, HTML, PDF or Excel depending on which option they select in the radio buttons preceding the 'generate report' command button.
    The files are created in the background (XML file created based on View Objects which is then transformed using the relevant API for the report type and then produces a file which is held in servers temp directory) and is served out through a FileDownloadActionListener component programmatically, which itself is surrounded by a Command Link with visibility property set to 'false' (as per this blog:http://www.jobinesh.com/2010/01/customizing-execution-of-to-validate.html).
    Everything works fine in that the reports generate correctly and after clicking on the 'generate report' button the browser's 'Open/Save' dialog box appears asking the user what they would like to do with the file. I am using Internet Explorer as that is what most of the client users will be using.
    The issue I'm having is as follows. For PDF and Excel types when the user clicks on 'Open' the file opens in separate Adobe Reader or MS Excel application windows respectively, which is as expected and required. However, the HTML document opens within the same browser window within which the application is running and from where the 'generate report' button was clicked. The issues this presents is that if the user closes the browser window displaying the report then they will need to open a new window to re-establish connection to the application. If they click the browser 'back' button then it takes them back to the original page but not in exactly the same state as it was before the report was launched i.e. there are some components missing and the page doesn't display correctly.
    Is there another way for me to achieve this or is it even possible? I tried setting the 'useWindow' property of the invisible command link surrounding the FileDownloadActionListener to 'true' which didn't work. I tried to surround it with a Go Link instead of a command link but that gave me NullPointerException's, I think because you can only use a component which has an 'Action' property?
    I appreciate your assistance as always.

    Hi,
      I'm not sure if this solution is appropriate to your situation, but I had the same problem with trying to redirect from a commandLink to a new window.  In the method that is called by the links action I used the following:
    // Open the url in a separate browser window
    ExtendedRenderKitService erks =
      Service.getRenderKitService(fctx, ExtendedRenderKitService.class);
    StringBuilder script = new StringBuilder();
    script.append("window.open('" + url + "', '', '');");
    erks.addScript(FacesContext.getCurrentInstance(), script.toString());

  • Horizontal Spry Menu doesn't display correctly in browser.  Displays correctly in live view and prev

    Hello,
    I am new to web building and am having trouble with my Spry menu.  It won't display correctly.
    www.denverphotographics.com
    Please Help!!
    Thanks,
    Rob

    #1 Upload your Spry Assets folder to your remote server.  The necessary CSS & JavaScript files are 404 not found.   That's why your menu looks un-styled.
    #2 Loud, gratuitous, unsolicited music on web sites is a very bad idea.  It forces a lot of people to click away from your site and never return.   It so happens I was listening to other media when I clicked on your site.  That cacophony of competing noise was not the least bit enjoyable.
    Nancy O.

  • HTML files do not display IE Icon..

    Please, I recently bought a new PC... installed DW on it but
    none of my HTML files is displaying properly... they work... but
    they do not appear with the typical IE logo... what to do ?
    Thanx in advance...

    "Sw Jiten" <[email protected]> wrote in
    message
    news:el331c$ca1$[email protected]..
    > the only one:
    >
    > Open your Windows Explorer, then go to any place in your
    Hard Disk and you
    > will see file right ? well.. what do they display? they
    display their
    > name,
    > properties and aslo, they are very recognizable because
    ... of the logo
    > or
    > icon they have... for example, a PDF document has a
    white and red icon...
    > an
    > html has a "IE" blue icon... well... that is what I mean
    that does not
    > appear... please, help..
    >
    Method 1:
    Open IE, select Tools menu then Internet Options.
    Now select the Programs tab.
    At the bottom of the Programs tab you'll see a checkbox
    labelled 'IE should
    check to see whether it is the default browser'.
    Ensure that box is checked.
    You may need to then restart IE to restore it as your PC's
    default browser.
    Method 2:
    You can also go to Control Panel and open Folder Options.
    Select the 'File Types' tab.
    In the list of 'Registered file types' you should find both
    HTM and HTML
    filetypes associated with IE.
    If not (and you've already tried Method 1) then select HTML
    in the list,
    then click the Change button.
    In the next window that appears you should be able to find IE
    listed and
    select it, also check the box 'Alwyas use the selected
    program to open this
    kind of file'
    Repeat this process for HTM files too if necessary.
    Martin.

  • URGENT-CREATE A HTML FILE WITH AN STRING INPUT FROM THE RUNNING JSP

    I am designing a web page where the user enters a page after entering his/her login and password.The User should now be provided with a display page containing the servers that he has permissions for access.The servers that he has permissions are maintained in a database(a normal text file in UNIX).
    Till now the program has been complete for displaying the servers that are available to him.
    I need to create a HTML form containing these servers names in a check box so that when the user clicks thcheck box against the server name it should go to the server and get the password for the required server.
    THe intention from me is to create a HTML file that dynamically takes values from the running JSP means the server names as a string value to its input and then i can continue
    Please guide me in creating a HTML form based on the string output from the running JSP
    FileInputStream fs = new FileInputStream("/root/Auth_Application/User_Access_List");
    DataInputStream in1 = new DataInputStream(fs);
    int fl=0;
    while (in1.available() !=0)
    String str1=in1.readLine();
    StringTokenizer st1 = new StringTokenizer(str1);
    String usernam=st1.nextToken();
    if (usernam.equals(uname))
    String ip=st1.nextToken();
    String host=st1.nextToken();
    fl=1;
    out.println("<tr><td>                                                                                              "+ host + "</td><td> " + ip +"</td></tr>");
    if (fl == 0)
    out.println("YOU HAVE NO SEVRER IN YOUR PROFILE !");
    in1.close();
    The host string here is the server name
    the ip is the ip address of the server
    Need to input these values to another HTML page that contains the check box list of the servers .
    once these are clicked i think i can pass on this to another JSP and retreive passwords
    Please guide me in this

    FileInputStream fs = new FileInputStream("/root/Auth_Application/User_Access_List");
                                    DataInputStream in1 = new DataInputStream(fs);
                                    int fl=0;
                                    while (in1.available() !=0)
                                    String str1=in1.readLine();
                                    StringTokenizer st1 = new StringTokenizer(str1);
                                    String usernam=st1.nextToken();
                                    if (usernam.equals(uname))
                                    String ip=st1.nextToken();
                                    String host=st1.nextToken();
                                    fl=1;
                                    out.println("<tr><td>                                                                                              "+ host + "</td><td>          " + ip +"</td></tr>");
                                    if (fl == 0)
                                    out.println("YOU HAVE NO SERVER IN YOUR PROFILE !");
                                    in1.close();I feel sorry for the inconvenience that is caused as i am new to using these forums.
    I have here used a simple program to retreive the names of the servers that the users have acess to..
    I have here read the servername and server ip stored from a file in UNIX in the running JSP.Now i need to pass these string variables to HTML file and display it in a Check box format.the strings host and ip have to be passed to the input of the HTML file so that they can further be processed once they are clicked using another JSP.
    Can anybody please help me in Passing these strings from the running JSP and display it in a check box format

  • HTML reader or other means to read HTML files in browser?

    On my old XP computer I had a default that easily allowed any HTML files to display as intended. On my Windows 8.1 laptop I can't find any option to do this. Will "Scratchpad" let me display html files? I have seen the online readers which are fine for text; but if images are included with the html file folder, it is very nice to have them show up on the page, which is linked to the images in the folder.
    I don't really want to go out and download software for this purpose if I'm missing something in my current system?
    thanks
    rosebud

    ''jscher2000 [[#answer-676473|said]]''
    <blockquote>
    Are these some HTML files that you saved on your computer?
    Firefox can display locally saved HTML files, but depending on how the pages were saved, some elements may be missing. There also are some security restrictions that Firefox applies to local files in a different way than pages on the web. Still, it's worth a try.
    Normally, double-clicking the file will launch it in your default browser. If there are problems with the display, could you describe them in more detail?
    </blockquote>
    The folder is unzipped now...it is an art tutorial folder....and maybe I did the wrong thing by asking my Wordpad to be the opener of the text file. That is written as HTML. Each time I click it, all I get is the raw HTML on a wordpad document. Maybe I should try downloading the zipped file again? I have another one that is in PDF format, that is no problem at all! It's the one with that non-PDF text file that's giving me headaches...
    [EDIT] Never mind, I found it! The change to Wordpad did no harm. I right clicked on that file and sure enough, it shows Firefox as the first option! I don't know how I missed it before. But when I chose that, the file opened just fine in the browser.
    All is well now! Thanks! ----- rosebud

  • HTML files not opened correctly

    I wrote an HTML document with Text Edit but when I tried to open it with Safari it was not rendered into a web page (instead Safari just displayed the code).
    When I imported HTML files that I'd created with NotePad on my Windows computer they opened fine as web pages in Safari, but when I tried to open them in Text Edit they were actually displayed as web pages instead of simply showing the code!

    When I imported HTML files that I'd created with NotePad on my Windows computer they opened fine as web pages in Safari, but when I tried to open them in Text Edit they were actually displayed as web pages instead of simply showing the code!
    In Text Edit-Preferences- Open & Save tab there is a check-box for 'Ignore rich text commands in HTML files'
    If you un-check this box, html files will display as just-the-code in Text Edit

Maybe you are looking for

  • How can I get a refund for my iCloud upgrade?

    .

  • How does FYI work with AME

    Using AME - Approvals Management Business Analyst responsibility on R12.1.1, I enabled FYI under configuration variables => Allow for your information notification = yes; for the transaction type specific value Payables invoice approval. I set up a r

  • Oracle rac 10g

    Dear all, I have by mistake posted this RAC related question under 'database' - Sorry about that. Below is my post and two replies from users Dear all, I am installing rac on 3 node OS is SLES 10 I am confused about partitions: I am following the doc

  • Reason - multiple stereo rewire to logic song templates anyone?

    Hi, I'm a recent convert to (intel) iMac/Logic Pro/Reason from PC/Cubase/Reason. After a whole weekend of head scratching, manual reading & forum browsing I've finally managed to set up a working environment with reason 3.05 rewired to logic - I have

  • Error in Delta Infopacakge after successful initialization

    Hi, We are having a content datasource 0customer_attr for which we are having Init and Delta infopackages. After the BI system copy from Productive system to Quality system, we have re-connected the R/3 source system and deleted the old Init settings