I can see my PHP script when I view source

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • thane_rm
    Private

    • Sep 2006
    • 1

    I can see my PHP script when I view source

    in the browser. Why am I able to see my PHP script when I view source code in the browser? I thought that the server was supposed to translate it and display it. You can see a test I was running at www.watermarkstudios.com/_index.html . If you view source you can see my PHP script.

    Why is it doing that?!!

    Ken
  • navaldesign
    General & Forum Moderator

    • Oct 2005
    • 12080

    #2
    Re: I can see my PHP script when I view source

    Because the page has been saved and published as html. You need to publish it as .php for the server to understand that it contains php code and treat it as such. As it is now, it treats it as html.
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

    Comment

    • econstas
      Second Lieutenant

      • Jul 2006
      • 105

      #3
      Re: I can see my PHP script when I view source

      1 way - just name it direct when saving page as
      2ne way: when you ahve the page.. right click => page properties. In the middle you will see file extension: html.. that scroll down will also have php option. While you are there, you can name your page. The Title of the page. This will change the name at the top of the page.
      Thanks,
      Stratis

      www.holleyjohnson.net
      mailto: stratis.constas@holleyjohnson.net

      Comment

      • aclips
        Private

        • Nov 2006
        • 4

        #4
        Re: I can see my PHP script when I view source

        You can always create a .htacess file in your webpage main folder with the folowing line

        AddHandler application/x-httpd-php .php .php3 .phtml .html .htm .php4

        This will intrepertate the php code in the html code
        Aclips
        WebPro Solutions
        http://www.funpolis.com
        http://www.portugal-golf-holidays.com
        http://www.webpro-designgrafico.com

        Comment

        Working...
        X