A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Installing and using PHP

  1. #1
    Senior Member
    Join Date
    Aug 2003
    Posts
    438

    Installing and using PHP

    The following code is loacated on http://www.angelfire.com/games5/scorpion8812/php1.php. How come nothing shows up? I am assuming that it is supposed to return "Hello World", but it doesn't. Can anybody tell me why?

    PHP Code:

    <html>
    <body>
    <?php
    $myvar 
    "Hello World";
    echo 
    $myvar;
    ?>
    </body>
    </html>
    I am a newbie to PHP, and don't really know how to use it.

    Thanks!

  2. #2
    You don't have your webserver configured for php processing. Are you using Apache, or IIS, or other?

  3. #3
    Senior Member
    Join Date
    Aug 2003
    Posts
    438
    Apache? IIS?

    Well.. Its windows ME.

    Also.. Why do I have to install PHP to write it, but not to view it?

    Thanks!

  4. #4
    Senior Member
    Join Date
    Aug 2003
    Posts
    438
    I tried the installation, but it asks me for server name, ISS type, etc. I have no idea what this is

    Thanks for any help the comes along!

  5. #5
    Hehe, you have much to learn my friend.

    PHP is a server side program that reads scripts and outputs html compatible code for browsers to read. This is basis for dynamic webpages.

    You don't need PHP installed to write a script. I've found myself writing scripts in notepad for quick fixes and such.

    Your script should output this:
    Code:
    <html>
    <body>
    Hello World
    </html>
    </body>
    And in your browser all you would see is:
    Code:
    Hello World
    Here's what happens:
    you make a request for a php page, http://somesite.com/index.php
    The webserver sees that you're requesting a php script and processes it. Then kicks out html based on the script. The problem you're running into is that the server is not configured for php.

    I have no idea if angelfire supports php scripts, but it looks like they do not. If that's the case... you'll have to either build your own server, or get a host that supports php. I recommend phpwebhosting.com to all my clients.

    Hope that makes sense to ya.

  6. #6
    Senior Member
    Join Date
    Aug 2003
    Posts
    438
    I think I get it..

    So all of that "Install php" thing is pretty much installing it on your OWN server to make it be able to understand php?

    So... If angelfire did understand PHP, I would be able to just use it right away?

    Thanks.

  7. #7
    Yup, that's it.
    If you're just wanting to play with php, I'd say create a webserver on your local box and do it that way. But if you're needing it for some other project, I'd suggest going with a php based host.

  8. #8
    Senior Member
    Join Date
    Aug 2003
    Posts
    438
    I am just playing with php, but I do want to find a free host that supports php. Do you know one?


    I don't mind ads, because I am just playing around with php. Thanks!

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center