Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5
This is the forum to discuss the Wrox book Beginning PHP4 by Wankyu Choi, Allan Kent, Chris Lea, Ganesh Prasad, Chris Ullman; ISBN: 9780764543647
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 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
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 26th, 2003, 04:54 AM
Registered User
Join Date: Jul 2003
Location: athens, , Greece.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default can't read file

i am using php4 on a windows 2000 platform running IIS 5.

on page 328 of the book i tried to do the counter example, but it does not work. i can not open the file.

has it something to do with teh slashes or because windows use different slashes than UNIX?

here is the code




if (!($fp = fopen($counter_file, "r"))) die ("Cannot open $counter_file");
$counter = (int) fread($fp, 20);


echo"You are the visitor no $counter.";

$fp = fopen($counter_file, "w");
fwrite($fp, $counter);


thanks a lot in advance


Reply With Quote
  #2 (permalink)  
Old July 28th, 2003, 04:54 AM
Friend of Wrox
Join Date: Jun 2003
Location: Wien, Wien, Austria.
Posts: 158
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to NotNowJohn

You have to ensure that IUSR_[your_machine_name] account has "read" and "write" permission on this file.

...but the Soon is eclipsed by the Moon
Reply With Quote

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
Help! how to read the file of *.xls hussar91404 C# 4 April 25th, 2014 03:41 AM
problem while file read watashi C++ Programming 1 November 5th, 2007 05:46 AM
Read Text file and convert to Binary file VB.net sjlsysprg1 Pro VB.NET 2002/2003 4 June 29th, 2007 06:53 AM
how to read file vivekkumar_23 Java Basics 1 April 3rd, 2006 10:03 AM
can an applet read from a file starsailor Pro JSP 1 January 7th, 2005 12:58 PM

All times are GMT -4. The time now is 01:15 AM.

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