Welcome to Dream.In.Code
Getting PHP Help is Easy!

Join 136,080 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 1,586 people online right now. Registration is fast and FREE... Join Now!




What Could Be The Problem

 
Reply to this topicStart new topic

What Could Be The Problem

fyrestorm
7 Sep, 2002 - 02:31 PM
Post #1

D.I.C Lover
Group Icon

Joined: 4 Apr, 2002
Posts: 3,103



Thanked: 2 times
Dream Kudos: 228
My Contributions
ok, referring to the opening a file and reading into a varaible thread

i've tried both methods given:

CODE
$filename = "file.html";
$fd = fopen ($filename, "r");
$contents = fread ($fd, filesize ($filename));
fclose ($fd);


as well as:

CODE
$file = implode('',file($filename));


and it's only catching the tail end of the file, any suggestions?
User is offlineProfile CardPM
+Quote Post

LammaDog
RE: What Could Be The Problem
7 Sep, 2002 - 03:20 PM
Post #2

D.I.C Head
**

Joined: 30 Sep, 2001
Posts: 114

try putting it in a while loop and handling each line one at a time....

CODE
while ( !feof ( $fp ) )
{
$line = fgets ($fp, 100 );
echo $line;
}

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/1/08 07:33PM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month