injecting text into script?
Posted: Thu Jul 30, 2009 6:03 pm
I'm needing to inject a text file into my code. I'v tried
but I get errors. I want the text part to execute as if it where written into the script, I don't want it to echo out.
I've got some cool ideas but I'm a terrible programmer, any help would be greatly appreciated.
Code: Select all
require('text.file");
include("text.file");
and
error_reporting( E_ALL );
$url = 'text.txt';
if ( ($fp = fopen($url,'r')) == true ) {echo $status = '';fpassthru($fp);}
else {echo $status = 'bad';
$fp = fopen($url);
}
I've got some cool ideas but I'm a terrible programmer, any help would be greatly appreciated.