PHP Coding
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Coding

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old September 11th, 2002, 01:45 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
modify text file with php

I have included a zip file which you can download from my site. http://www.dreamingdigital.ca/www.zip the passwords to login are both "demo"

I have a problem with my modify.php and modifyme.php files. I do not know how to fix the extra lines php is throwing into my .dat file when it writes the data back into the file.

What happens:
Php reads in the ppt.dat file as a 2D array in modify.php
User inputs which string to delete.
Php sends that number to the modifyme.php file which reads the ppt.dat file to an array, omits the string which it is told to delete, then continues writing the rest of the array.

The Problem:
The 1st modification works flawlessly. The 2nd modification PHP throws in phantom extra lines every other line in the ppt.dat file!! This messes up how the ppt.dat file gets read in the arrays.

Thank you in advance.

Colin Puttick
Webmaster Dreaming Digital
www.dreamingdigital.ca

Reply With Quote
  #2  
Old September 11th, 2002, 03:09 PM
notepad notepad is offline
Codewalkers Loyal (3000 - 3499 posts)
 
Join Date: Apr 2007
Location: Central, IL USA
Posts: 3,214 notepad User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Send a message via AIM to notepad
RE: modify text file with php

i can't download from where i'm at but it sounds like when re-writing the array you're writing some new lines..

can u include the code here?

Reply With Quote
  #3  
Old September 13th, 2002, 04:10 AM
zombie zombie is offline
Codewalkers Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2007
Location: serbia
Posts: 1,876 zombie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: modify text file with php

it looks like (i also didn't dl-ed file) u are joining that array with new lines, 'n' instead just ''.

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Coding > modify text file with php


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway