+ Reply to Thread
Results 1 to 4 of 4

Thread: PHP Shorthands are not working in my Site

  1. #1
    ankokuflare is offline x10Hosting Member ankokuflare is an unknown quantity at this point
    Join Date
    Mar 2009
    Posts
    2

    PHP Shorthands are not working in my Site

    I'm trying to include a php file
    Code:
    <?php include("menu.php"); ?>
    from my host in my .htm webpage.
    I got nothing. I also tried editing the htaccess as well.
    It worked perfectly fine in my previous host,but why not in here?

  2. #2
    akkudreamz's Avatar
    akkudreamz is offline x10 Sophmore akkudreamz is an unknown quantity at this point
    Join Date
    Jan 2009
    Location
    Jaipur, Rajasthan, India
    Posts
    183

    Re: PHP Shorthands are not working in my Site

    the code is working fine
    you can't use php code in an .htm file....you need to save your .htm as .php
    Be safety conscious. 80% of people are caused by accidents.
    My Weblog

  3. #3
    Scoochi2's Avatar
    Scoochi2 is offline x10 Sophmore Scoochi2 is an unknown quantity at this point
    Join Date
    Aug 2008
    Location
    Southport!
    Posts
    185

    Re: PHP Shorthands are not working in my Site

    Quote Originally Posted by akkudreamz View Post
    the code is working fine
    you can't use php code in an .htm file....you need to save your .htm as .php
    Actually, PHP can be run in a .htm or .html file, but it requires editing of .htacess

    Code:
    AddType application/x-httpd-php .htm .html
    Add the above to a .htaccess file, save it and *bingo*! (hopefully).

    If you're unfamiliar with .htaccess files, create a new file named EXACTLY '.htaccess' (without the quotes, nothing before the period!). In it, put the above and save it to your root directory.
    Last edited by Scoochi2; 04-24-2009 at 10:53 AM.
    If anyone can see it, my post was meant for anyone who reads it. Don't take it personally or think I'm being condescending... :nuts:

  4. #4
    freecrm's Avatar
    freecrm is offline x10 Elder freecrm is an unknown quantity at this point
    Join Date
    May 2008
    Location
    UK
    Posts
    629

    Re: PHP Shorthands are not working in my Site

    Stupid question... does your new host support php?

    Simple enough to find out, because the code remains in the source code when you open the page.

    Just try a simple echo statement.

    either that, or try phpinfo();

+ Reply to Thread

Similar Threads

  1. Site not working - wordpress's fault?
    By Neurosylum in forum Free Hosting
    Replies: 0
    Last Post: 06-12-2008, 12:15 AM
  2. Intermediate PHP Not working on Stoli?
    By tondopie in forum Free Hosting
    Replies: 1
    Last Post: 05-07-2008, 06:34 PM
  3. POLL: What do you use your site for?
    By thecrop in forum Crossfire
    Replies: 55
    Last Post: 02-06-2008, 12:56 PM
  4. Site not working
    By Immortal in forum Free Hosting
    Replies: 1
    Last Post: 09-10-2005, 02:49 PM

Tags for this Thread

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