newbtophp Posted March 1, 2010 Share Posted March 1, 2010 I was wondering i have the following code, where $fp is fopen... (currenting im calling a file, but i no longer want to, i want to embed the files content directly, but fread doesnt seem to work like that): $fd = fread($fp,"28429"); How would i do the same without actually using fopen but instead making the file as a string like: $fd = fread("string....","28429"); I've tried it but it gives errors, is their a way I can use fread or mimic its functionality but on a string? :-\ Link to comment https://forums.phpfreaks.com/topic/193718-fread-on-a-string/ Share on other sites More sharing options...
newbtophp Posted March 1, 2010 Author Share Posted March 1, 2010 Solved i just replaced it with file_get_contents Link to comment https://forums.phpfreaks.com/topic/193718-fread-on-a-string/#findComment-1019652 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.