Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > PHP filesystem problems

PHP filesystem problems
Thread Tools
Professional Poster
Join Date: May 2001
Location: North Dakota, USA
Status: Offline
Reply With Quote
Sep 5, 2001, 08:28 PM
 
I'm trying to write a simple little PHP script that takes in an e-mail address the user types into a text field and put it at the end of a text file called 'mailinglist.txt' This file contains a list of all the e-mail addresses signed up for the list.
However, using fopen( $thefilepath, "a" ) (for appending text to the end of a file) doesn't work. I need to access the file through FTP (i.e., $thefilepath is like 'ftp://user ass@ftp.server.com/list.txt' ) , and that may be the problem - but reading the file into a variable, appending the address to that, and then writing over the file doesn't work, either. Anyone have any ideas/suggestions?

(actually, typing that made me realize that in the script I don't rewind the file pointer when I try to overwrite the file with the variable - but I wouldn't think that's the problem. Oh, and MySQL database isn't an option.)
     
Grizzled Veteran
Join Date: Jan 2000
Location: California
Status: Offline
Reply With Quote
Sep 6, 2001, 01:58 AM
 
Whenever I encounter problems such as this, it is usually a permissions issue. Make sure that you webserver has write access to the file.

hope this helps...
     
   
Thread Tools
Forum Links
Forum 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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:42 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2