Tizag Webmaster Forums  

Go Back   Tizag Webmaster Forums > Web Development > Server-Side Scripting

Reply
 
Thread Tools Display Modes
  #1  
Old 11-05-2009, 12:45 AM
WebDesignLearner WebDesignLearner is offline
Newbie
 
Join Date: May 2009
Posts: 23
WebDesignLearner will become famous soon enough
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!
Reply With Quote
Sponsored Links
  #2  
Old 11-05-2009, 01:56 AM
greatstar00 greatstar00 is offline
Graduate Student
 
Join Date: Sep 2007
Posts: 574
greatstar00 has a spectacular aura aboutgreatstar00 has a spectacular aura about
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")
Reply With Quote
  #3  
Old 11-05-2009, 02:43 AM
WebDesignLearner WebDesignLearner is offline
Newbie
 
Join Date: May 2009
Posts: 23
WebDesignLearner will become famous soon enough
Quote:
Originally Posted by greatstar00 View Post
u installed xampp
did u run xampp?
and after run xampp, did u make sure apache, and php are running?
yes, i entered http://localhost/ in the browser's address bar, and it showed a xampp's page, and i clicked status, and it showed that php and apache are activated
Reply With Quote
  #4  
Old 11-05-2009, 02:47 AM
WebDesignLearner WebDesignLearner is offline
Newbie
 
Join Date: May 2009
Posts: 23
WebDesignLearner will become famous soon enough
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
Reply With Quote
  #5  
Old 11-05-2009, 05:56 AM
WebDesignLearner WebDesignLearner is offline
Newbie
 
Join Date: May 2009
Posts: 23
WebDesignLearner will become famous soon enough
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.
Reply With Quote
  #6  
Old 11-14-2009, 12:27 AM
jlhaslip jlhaslip is offline
Student
 
Join Date: Mar 2007
Posts: 393
jlhaslip will become famous soon enough
and start the server first...
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 01:26 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008, Tizag