Closed Thread
Results 1 to 3 of 3

Thread: using php integrated into my html script

  1. #1
    askjames.lmx31 is offline x10Hosting Member askjames.lmx31 is an unknown quantity at this point
    Join Date
    Jun 2011
    Posts
    3

    using php integrated into my html script

    at my www i have an HTML file called index.html which is the only file so far i have uploaded. I put a basic bit of php script into it (using <?php ?>) and it will not run it? it is a simple echo hello world, and the browser picks up other parts of the page? if you go to the site ( http://fbacs.x10.mx ) it reveals why; right click view source, and it shows that the php script insertion has been miss-interpreted as a comment? but i didn't actually put <!--? i put <? ???? whats going on here? do i have to install php? how do i get it to run php scripts?

  2. #2
    stpvoice's Avatar
    stpvoice is offline Community Support Rep stpvoice has a brilliant futurestpvoice has a brilliant futurestpvoice has a brilliant future
    Join Date
    Dec 2008
    Location
    United Kingdom
    Posts
    5,939

    Re: using php integrated into my html script

    Hello,

    Unless a file has a php extension the server does not parse the code. You need to remodel the script so that it's a php file with html, rather than the other way around.

    Thanks.


  3. #3
    Livewire's Avatar
    Livewire is offline Abuse Compliance Officer Livewire is a glorious beacon of lightLivewire is a glorious beacon of light
    Join Date
    Jun 2005
    Location
    Behind a keyboard.
    Posts
    8,995

    Re: using php integrated into my html script

    Minor correction, rename it to index.php, problem should be solved. You can embed php into an html page that way, but it has to be a .php extension for the server to parse it as php.

    The PHP parser will leave everything NOT between <?php ?> tags alone; everything between them will be processed as php


    TOS breakers will be suspended regardless of race, creed, national origin, hair color, or favorite food. Thanks for your understanding!

Closed Thread

Similar Threads

  1. PHP script within Html or htm
    By timmy09 in forum Programming Help
    Replies: 2
    Last Post: 10-02-2010, 02:09 PM
  2. PHP AND HTML Email Script Help
    By mattblog in forum Programming Help
    Replies: 4
    Last Post: 08-03-2010, 02:55 PM
  3. RSS to HTML PHP Script (FREE)
    By unmanaged in forum Scripts & 3rd Party Apps
    Replies: 6
    Last Post: 02-21-2008, 04:44 PM
  4. Including PHP script in HTML
    By chrisv in forum Free Hosting
    Replies: 7
    Last Post: 08-31-2007, 08:10 PM
  5. HTML Tester Script...
    By Fedlerner in forum Scripts & 3rd Party Apps
    Replies: 3
    Last Post: 09-28-2006, 09:05 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers