Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143
This is the forum to discuss the Wrox book Beginning PHP 6, Apache, MySQL 6 Web Development by Timothy Boronczyk, Elizabeth Naramore, Jason Gerner, Yann Le Scouarnec, Jeremy Stolz; ISBN: 9780470391143
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 30th, 2012, 10:26 AM
Registered User
Points: 31, Level: 1
Points: 31, Level: 1 Points: 31, Level: 1 Points: 31, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2012
Location: Ontario, Canada
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy My first php program

I am told there are no such things as stupid questions.....

Written the first PHP program (per book), saved it, but cannot open it in browser.

Must the file be saved in any special file?
Must a server be running?

http://localhost/firstprog.php brings up 404 error "The requested URL /firstprog.php was not found on this server"

Brian
Reply With Quote
  #2 (permalink)  
Old January 31st, 2012, 07:59 AM
Friend of Wrox
Points: 651, Level: 9
Points: 651, Level: 9 Points: 651, Level: 9 Points: 651, Level: 9
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2011
Location: North East UK
Posts: 125
Thanks: 0
Thanked 24 Times in 24 Posts
Default

Greetings,

You are running a web server on your PC?

If so the file 'firstprog.php' should be placed in the 'htdocs' directory within the web server, for XAMPP this would be /xampp/htdocs/firstprog.php the location of the htdocs dir will vary depending on the web server you are using.

But once setup pointing your browser to: http://locahost/firstprog.php should result in the script being ran and you seeing the output from said script.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
HOW to Run php program dimpleboy PHP How-To 7 January 22nd, 2015 12:40 AM
Where is php.exe program ? emlacongabebe PHP How-To 2 April 19th, 2010 01:30 AM
problem during execution of php program greenday Beginning PHP 2 November 12th, 2007 04:51 PM
Setup Project: Program not added in Start>Program arif_1947 VS.NET 2002/2003 2 March 31st, 2005 06:40 AM
downloaded php program doesn't work lanita BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 5 June 16th, 2004 10:17 AM



All times are GMT -4. The time now is 05:19 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.