none
Can RRS feed

  • Question

  • I am currently working a on a php website that uses Zend Framework which contains .phtml files (html files that also can contain php script blocks). It would be great if expression web had a Open File As PHP option, like they have for other formats (Open As CSS, XML, HTML, Text). I can live without it but my biggest problem is whenever I try to save one of these files I get the following message,

    "This page contains one or more PHP script blocks which require that you save the page with a PHP file extension. Remove the PHP script blocks from the page or save the page with a PHP file extension."

    There is no option to never show the message again!!! Ultimately I have resulted to adding .php to the end of my .phtml files so I get php syntax highlighting and no more error message. It is a real pain to have to always rename a file anytime I want to edit one. Anyone else have any other work arounds I maybe havn't thought of? Or better yet a way to get the message to go away.

    Monday, April 6, 2009 3:32 PM

All replies

  •  It would be great if expression blend had a Open File As PHP option, like they have for other formats (Open As CSS, XML, HTML, Text). 

    Expression Blend?
    --
    Chris Hanscom - Microsoft MVP
    Resource Center | Veign's Blog | Web Development Help
    Monday, April 6, 2009 3:37 PM
  • Tools > Application options > Configure editors tab.
    Scroll down to php php2 php3  and click once to select it.
    Click the modify extension icon ( second from the left right above the extensions column )
    Add phtml to the list, and make sure Expression Web (open as html) is the default editor.




    FrontPage MVP
    Monday, April 6, 2009 3:40 PM
  • Expression Blend?
    --
    Chris Hanscom - Microsoft MVP
    Resource Center | Veign's Blog | Web Development Help
    fixed...obviously I am not trying to create php files in blend.

    Thanks Steve but I already gave that try and unfortunately it doesn't make a difference.


    Monday, April 6, 2009 3:46 PM
  • Thanks Steve but I already gave that try and unfortunately it doesn't make a difference.

    Did you close and reopen EW?

    FrontPage MVP
    Monday, April 6, 2009 3:49 PM
  • Yeah, it opens like a normal html page with only html highlighting and all the php script is in a maroon color. Still gives the message as well.
    Monday, April 6, 2009 3:51 PM