delickate Posted April 3, 2009 Share Posted April 3, 2009 Hi , i've created a file on server by this code: $myFile = "maillist.txt"; $fh = fopen($myFile, 'w'); foreach($mymailarra2 as $maillist) fwrite($fh, $maillist.","); fclose($fh); //here $mymailarra2 is an array having values it creates a file and inserted a data. i've checked it out. now i m reading a data by this code: $myFile = "maillist.txt"; $fh = fopen($myFile, 'r'); $theData = fread($fh, filesize($myFile)); $words = split("[\n\r\t, ]+", $theData); fclose($fh); foreach($words as $latestdata) { echo $latestdata."<br>"; } it is working fine on my local machine but nothing displaying on my server. can any one help plz why its not showing on online site?. only showing on local machine Link to comment https://forums.phpfreaks.com/topic/152397-help-plztxt-file-reading-prob/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.