Hi,
I'm trying to put lines of codes inside a created php page...Here is my portion of code:
$filename = 'DOC_Temp/Dauks_1.php';
$fp = fopen($filename, "w");
if ( $fp )
{
$string = "<?php require_once('../clsMsDocGenerator.php'); $doc = new clsMsDocGenerator(); $doc->addParagraph('this is the first paragraph'); $doc->output();?>";
$write = fputs($fp, $string);
fclose($fp);
header("location😃OC_Temp/Dauks_1.php");
exit();
}
else
{
die( "fopen failed for $filename" ) ;
}
Now If I open up the filename Dauks_1.php, this is the result I get:
<?php require_once('../clsMsDocGenerator.php'); = new clsMsDocGenerator(); ('this is the first paragraph'); ();?>
It seems to have omitted to put the $doc-> string...
How can I make $string to include everything? Or am I doing this the wrong way ? Please help someone! :bemused: