+ Reply to Thread
Results 1 to 4 of 4

Thread: Getting started with Php

  1. #1
    robray is offline x10Hosting Member robray is an unknown quantity at this point
    Join Date
    Jan 2010
    Posts
    11

    Getting started with Php

    hi,

    I had read on the Site (under Php help) that all accounts are now on 'Intermediate level' of php.

    However, when i put the following lines of code into a html file.. i get the results shown beneath the code snippet.

    code snippet:
    1<br>
    <?php echo( "<h1>Php is alive and kicking!</h1>" ); ?>
    2<br>
    <?PHP echo "hello"; ?>
    3<br>
    <pre>

    Results in:
    1
    Php is alive and kicking!" ); ?> 2
    3

    This is exactly the same response when i open this file off the file system from my Firefox browser. My conculsion is that php is not running for my account.

    So my question is: How do i turn it on ?

    Thanks for your help... :-)

    have a nice day

    Robray.

  2. #2
    diabolo's Avatar
    diabolo is offline Community Advocate diabolo is on a distinguished road
    Join Date
    Nov 2007
    Location
    Jersey Shore
    Posts
    1,683

    Re: Getting started with Php

    PHP Code:
    1<br>
    <?php echo  "<h1>Php is alive and kicking!</h1>"?>
    2<br>
    <?PHP echo "hello"?>
    3<br>
    <pre>
    also, when posting code, use the appropriate code tags.
    [ QUOTE ] [ /QUOTE ]
    [ CODE ] [ /CODE ]
    [ HTML ] [ /HTML ]
    [ PHP ] [ /PHP ]
    Last edited by diabolo; 01-12-2010 at 05:05 PM.

  3. #3
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,636

    Re: Getting started with Php

    A. PHP is "on" for every hosting account
    B. When put into atestpage.php and requested from the web, it shows

    1

    Php is alive and kicking!

    2
    hello3

    for me.

    C. If you put it in ashtml.html, you just get the numbers
    D. Perhaps you corrected a mistake in your original when you posted it here.
    Nothing is always absolutely so.

  4. #4
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: Getting started with Php

    Quote Originally Posted by robray View Post
    However, when i put the following lines of code into a html file..
    That's the problem right there. Only files with a .php extension are processed by PHP. It's an unnecessary drain on server resources to have all html files processed by PHP.

    If you're worried about ".php" extensions in URLs, turn on MultiViews with Options +MultiViews in your root .htaccess and leave extensions completely out of URLs.

    Quote Originally Posted by robray View Post
    My conculsion is that php is not running for my account.
    You're jumping to conclusions.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

+ Reply to Thread

Similar Threads

  1. [PHP] Basics of PHP Scripting
    By jeeter in forum Tutorials
    Replies: 21
    Last Post: 02-03-2010, 04:29 PM
  2. Ever Been Suspended For Using PHP?
    By dragoneye_xp in forum Off Topic
    Replies: 26
    Last Post: 08-16-2009, 07:17 PM
  3. [PHP] Variables in PHP
    By Bryon in forum Tutorials
    Replies: 15
    Last Post: 01-29-2009, 09:46 AM
  4. My 2cents on Ruby vs PHP.
    By jwillia in forum Programming Help
    Replies: 0
    Last Post: 03-15-2008, 11:18 PM
  5. Replies: 3
    Last Post: 03-10-2008, 12:22 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