Results 1 to 4 of 4

Thread: I can see my PHP script when I view source
      
   

  1. #1
    Join Date
    Sep 2006
    Posts
    1

    Question 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

  2. #2
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,080

    Default 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!


  3. #3
    Join Date
    Jul 2006
    Location
    Durham, NC
    Posts
    105

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

  4. #4
    Join Date
    Nov 2006
    Location
    Portugal
    Posts
    4

    Red face 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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •