running script from textfile array
Posted: Sat May 04, 2002 12:00 pm
Ok this is it in a nutshell.
I'm using a nice bit of script doing this.
$base = explode("|", $file[$arr]);
But now the thing is... I'd like to check if a certain bit resulting from this is script... say $base[2] .. is script or text
And I'd like to run this bit as php script in stead of just printing it in a nice table.
So I got to check if the first 5 characters of $base[2] are <?php and if so.. then run it... I haven't been able to figure it out yet.
Or is it possible to just enter a code in the middle of any textbit that you retrieve from file that will be run? Or have a bit of script do that for you?
I'm using a nice bit of script doing this.
$base = explode("|", $file[$arr]);
But now the thing is... I'd like to check if a certain bit resulting from this is script... say $base[2] .. is script or text
And I'd like to run this bit as php script in stead of just printing it in a nice table.
So I got to check if the first 5 characters of $base[2] are <?php and if so.. then run it... I haven't been able to figure it out yet.
Or is it possible to just enter a code in the middle of any textbit that you retrieve from file that will be run? Or have a bit of script do that for you?