Jump to content

Fread() on a string?


newbtophp

Recommended Posts

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

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.