![]() |
|
#1
|
|||
|
|||
|
How to use php in pc
hi
i have window vista, and i'm new to php and webpage design i have a free web host account so i'm going to put a web site there i have made a .php file with a simple <?php require(somepage.php) ?> code, and i want to test it before i upload it to the server i downloaded and installed php on my computer, but i can't open my php file with a browser i even download and install xampp since they say they make installing apache, php, mysql, etc. easier but i still can't view the .php file when i first try to open it, it prompted me to choose a program to open it, so maybe .php files are not supposed to be opened with browsers? i don't know how php works, what should i do to be able to view the .php file on my pc? thanks! |
| Sponsored Links |
|
#2
|
|||
|
|||
|
u installed xampp
did u run xampp? and after run xampp, did u make sure apache, and php are running?
__________________
Free webspace to test php/mysql (keep backup) MySQL Host: sql305.0lx.net >FTP Server: ftp.0lx.net >DB name: 0lx_4217081_testdb FTP/SQL User: 0lx_4217081 >FTP/SQL Password:123456 Website URL: use4free.co.cc (upload to folder "htdocs") |
|
#3
|
|||
|
|||
|
Quote:
|
|
#4
|
|||
|
|||
|
just some more information
when i open the .php file with a browser, it asks me to save it instead of opening it, like it's not a web page |
|
#5
|
|||
|
|||
|
ok
i finally figured it out you have to put it under the server's directory, in my case /xampp/htdocs, and access it from http://localhost/ no one expected me to be that ignorant, i guess Last edited by WebDesignLearner; 11-05-2009 at 09:47 AM. |
|
#6
|
|||
|
|||
|
and start the server first...
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|