I was just wondereing if there is a way to load an external text file into a variable.
I've heard that u can use openfile() to directly echo a file's content onto the page. But that's no good of I want to play around with the file in php.
I've also head that there's a way to read a file using fopen() eg.
Code:
//second parameter can content: a=append, r=read, w=write etc.
$myFile = fopen("aFile.txt","r");
//do something over here to load it into a variable
For when I just echo "$myFile" it returns "Resource id #2".
Can anyone help??
Last edited by jclarke; 08-02-2006 at 03:42 AM.
HTML+Flash+JavaScript+CSS = Some Kick-Ass Website
JacobClarkeZone.com - Members Zone, Games, Toons, Graphics, Music and more...
Bookmarks