dcsimg
www.webdeveloper.com
Results 1 to 4 of 4

Thread: Can't load .php files!

  1. #1
    Join Date
    Feb 2006
    Posts
    18

    Can't load .php files!

    Hello,

    Whenever I try to load PHP files through IE using EasyPHP the only thing that shows up in IE is the code from the file.

    For example, I have a file hosted locally called index.php with only:

    <?php

    phpinfo();

    ?>

    and that is exactly what shows up when I load it in my browser. So far I've made sure that I didn't save the file as a text file and tried opening the file with IE using 'Choose Program'.

    I believe the error is related to my computer not EasyPHP. Could somebody please help?

    I should probaly note that I'm using Windows 2000 on a old laptop.

  2. #2
    Join Date
    Aug 2005
    Location
    The Garden State
    Posts
    5,634
    you need to install a web server, like apache or iis, and then PHP.

    you then put the php file somewhere in the directories associated with the web server; typically in the "htdocs" or similar directory.

    you can then run the script. PHP is not something that runs on your browser, it's something that runs on a server.

  3. #3
    Join Date
    Oct 2004
    Location
    The very depths of programming hell
    Posts
    828
    Make sure you also configure you server (Apache is your best bet) to interpret PHP files. Having your server send the source code of your PHP files to clients could be disastrous.

  4. #4
    Join Date
    Sep 2006
    Location
    Bucharest, RO
    Posts
    940
    EasyPHP includes a webserver! You are opening the file by just double-clicking it, right? Bad idea! Just go to http://localhost and your file will be somewhere around there... Just don't double click it, you have to call it via the server, http://localhost

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
  •  
HTML5 Development Center



Recent Articles