locked
help please php RRS feed

  • Question

  • Hello i am rying to run some php scripts through expression web 4.

    now i have php installed i can make a simple file such as the hello script and it will run.

    the problem i am having is that when i try to run a html page that passes info to the php page such as a contact form, what happens is i click the send button and ie opens the php files content to the screen so instead of say sending an email i get the code of the php script. ie <?php echo hello ect.. is this a bug with expression web and php as this is happening on downloaded contact form scripts which should be working? it seems to not run the php page so much as displayes it in stead. any help would be greatly apprieciated.


    brendan
    Saturday, May 14, 2011 8:52 AM

Answers

  • "through expression web 4" - does that mean you are using Preview in Browser?

    In that case, use Site->Site Settings
    On the preview tab, make sure that "For all web pages" is selected. If it isn't, .htm (or .html) pages will preview via the file system, not using the server, and pages linked to them (such as .php pages) will also be called from the file system. PHP pages must be viewed through a server.


    Ron Symonds
    Microsoft MVP (Expression Web)

    www.rxs-enterprises.org/fp
    • Marked as answer by Soleous75 Monday, May 16, 2011 6:08 AM
    Saturday, May 14, 2011 9:20 AM

All replies

  • "through expression web 4" - does that mean you are using Preview in Browser?

    In that case, use Site->Site Settings
    On the preview tab, make sure that "For all web pages" is selected. If it isn't, .htm (or .html) pages will preview via the file system, not using the server, and pages linked to them (such as .php pages) will also be called from the file system. PHP pages must be viewed through a server.


    Ron Symonds
    Microsoft MVP (Expression Web)

    www.rxs-enterprises.org/fp
    • Marked as answer by Soleous75 Monday, May 16, 2011 6:08 AM
    Saturday, May 14, 2011 9:20 AM
  • I'm having a little trouble understanding your post. Have you installed PHP on your local system for the development server to use? That is the first thing required to parse your PHP. The second is that you need to do as Ron suggested and set Expression Web to view all pages through the local development server. When you preview an html page through the file system EW doesn't know anything more about the links you might follow from that page or the need to launch a server to parse a php form handler. By starting your preview with the html pages being viewed in the server it is running when the php page is called to accept the form field data.
    Free Expression Web Tutorials
    For an Expression Web forum with without the posting issues try expressionwebforum.com
    Saturday, May 14, 2011 11:07 AM
  • thankyou both so much, in every tutorial on this i 'kept missing this one point' turn on for all pages.

    simple and beautiful and logical now looking at it.

    thankyou again _Ronx and Cheryl

    much apprieciated


    brendan
    Monday, May 16, 2011 6:07 AM