Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9
This is the forum to discuss the Wrox book PHP and MySQL: Create-Modify-Reuse by Timothy Boronczyk, Martin E. Psinas; ISBN: 9780470192429
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old June 21st, 2010, 07:06 PM
Registered User
Join Date: Jun 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default error in main.php

In other posts I read one mistake in the file main.php

// 401 file referenced since user should be logged in to view this page
//include '401.php';

the sentence include '401.php'; appear as a comment. So I deleted the two diagonals. But when I uploaded to my server, appear's nothing in this page(main.php) like some type of error. Then, I deleted the sentence include'401.php', and it works with out problem, but I can see this page without login, It`s because whe call 401.php, but does not work with this sentence.
someone knows why?
thank you
  #2 (permalink)  
Old June 22nd, 2010, 05:52 PM
Authorized User
Points: 374, Level: 6
Points: 374, Level: 6 Points: 374, Level: 6 Points: 374, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jul 2009
Location: San Jose, Californina
Posts: 77
Thanks: 4
Thanked 6 Times in 6 Posts

Hi acevedoalej,

You include a 401.php file at the top of a page
to protect that page, so only people who are logged in can
see it. Basically the 401.php script checks to see if the user
is authenticated and if not it redirects them back to
the login page. The book has a good discussion of this on
page 24, the last five lines.

As far as the actual content of the 401.php file goes,
I am using the code out of the book (not the download code)
and that is working for me.

I hope this helps.

Similar Threads
Thread Thread Starter Forum Replies Last Post
ch 1 'main.php' code wrong danb100 BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9 2 September 5th, 2009 10:54 PM
error:exception in thread main java.lang.noclassde sara.j JSP Basics 0 December 13th, 2006 12:35 AM
ERROR "Exception in thread "main" java.lang.NoClas nitinnishi BOOK: Beginning Java 2 3 June 17th, 2006 07:07 AM
Throwing error back to main thread AgentSmith General .NET 0 April 26th, 2006 09:14 AM
Error: movie.php & commit.php on p182-186, ch6 willburke BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 October 12th, 2004 02:48 PM

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