RE: [PHP-DB] Saving DB Resuts to a file

From: Date: Fri, 12 Apr 2002 21:01:52 +0000
Subject: RE: [PHP-DB] Saving DB Resuts to a file
Groups: php.db 
Request: Send a blank email to php-db+get-18461@lists.php.net to get a copy of this message
Hi Chris, This is probably due to a permissions problem on your newsletter subdirectory. Go to the server and change the newsletter subdirectory's permissions to be 777 (leaving it that way could be a security hazard, depending on if you have important information stored in that directory or not, and if there are other people that could get on the server). Then try running the script again. - Jonathan -----Original Message----- From: Chris Payne [mailto:chris@planetoxygene.com] Sent: Friday, April 12, 2002 1:52 PM To: php-db@lists.php.net Subject: Re: [PHP-DB] Saving DB Resuts to a file Hi there, I entered the code in as you described below, and it LOOKS on the screen as thought it is doing it, but when I look at the server there is no output file, can you see anything obvious that I am doing wrong? Thanks for your help. Chris $connection = mysql_connect("localhost","xxxxxx","xxxxxx") or die("Couldn't make a connection."); // select database $db = mysql_select_db("mailinglist", $connection) or die("Couldn't select database."); return $connection; $query = mysql_query("select * from emaillist"); fopen("/web/newsletter/test.txt", w); while ($row = mysql_fetch_array($query)) { fwrite("$row[EMail]\n"); echo $row[EMail]; } fclose("/web/newsletter/test.txt"); -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.db (#18461) next »