Jump to content

help plz:txt file reading prob


delickate

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.