User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 427,227 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,224 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 332 | Replies: 14
Reply
Join Date: Jul 2008
Posts: 20
Reputation: phouse512 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
phouse512 phouse512 is offline Offline
Newbie Poster

Re: Another Problem

  #11  
Jul 23rd, 2008
Do you mean change the text file name to something different?
Reply With Quote  
Join Date: Nov 2007
Location: Arkansas
Posts: 399
Reputation: buddylee17 will become famous soon enough buddylee17 will become famous soon enough 
Rep Power: 2
Solved Threads: 78
buddylee17's Avatar
buddylee17 buddylee17 is online now Online
Posting Whiz

Re: Another Problem

  #12  
Jul 23rd, 2008
Huh. Just to verify this, run the above script again but change the file name to something not in the current directory. If it creates a new file, it will output "file opened The file is empty"
Lost time is never found again.
- Benjamin Franklin
Reply With Quote  
Join Date: Jul 2008
Posts: 20
Reputation: phouse512 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
phouse512 phouse512 is offline Offline
Newbie Poster

Re: Another Problem

  #13  
Jul 23rd, 2008
Alright, I think it just worked, I changed the name of the text file, ran the php file again, and there was another text file named testFile.txt. The script outputted: file opened The file is empty
Reply With Quote  
Join Date: Nov 2007
Location: Arkansas
Posts: 399
Reputation: buddylee17 will become famous soon enough buddylee17 will become famous soon enough 
Rep Power: 2
Solved Threads: 78
buddylee17's Avatar
buddylee17 buddylee17 is online now Online
Posting Whiz

Re: Another Problem

  #14  
Jul 23rd, 2008
Yeah, change it to testFile2.txt or something.
Lost time is never found again.
- Benjamin Franklin
Reply With Quote  
Join Date: Jul 2008
Posts: 20
Reputation: phouse512 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
phouse512 phouse512 is offline Offline
Newbie Poster

Re: Another Problem

  #15  
Jul 23rd, 2008
Ok, now maybe I will just have to open files the way you did. Can you explain how this part of the code works?

  1. <?php
  2.  
  3. $file="testFile.txt";
  4.  
  5. $fp = fopen($file, "a+");
  6.  
  7. ?>
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb PHP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 11:36 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC