PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
hi,
i have the following code, which doesn't have the right output. Is because of !feof
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
$lines = file ('http://www.example.com/');
// Loop through our array, show html source as html source; and line numbers too.
foreach ($lines as $line_num => $line) {
$h = fopen($line, "a");
fwrite($h, "Plain Text");
fclose($h);
}
Ward: thank you for your reply.
there is a slight problem. the script generates only the last line from "readfrom.txt" file and therefore the outcome is only one file, instead of all the files.