hi
i want to write a content in $text into the file. For that i wrote the below code .But i run that code i got the following errors.How i avoid that errors and write the whole content in $text into the file.plz help me
errors : Notice: Undefined variable: myclass in F:\Facebook\fur niture11\DataMi ning\public_htm l\admin\files.p hp on line 6
Notice: Undefined variable: myclass in F:\Facebook\fur niture11\DataMi ning\public_htm l\admin\files.p hp on line 6
success writing to file
i want to write a content in $text into the file. For that i wrote the below code .But i run that code i got the following errors.How i avoid that errors and write the whole content in $text into the file.plz help me
Code:
<?php
$handle = fopen("myfile.php", 'w+');
if($handle)
{
$text="<?php include('ClassName.class');$myclass = &new ClassName; echo $myclass->myfunction1(); ?>";
if(!fwrite($handle,$text))
die("couldn't write to file.");
echo "success writing to file";
}
?>
errors : Notice: Undefined variable: myclass in F:\Facebook\fur niture11\DataMi ning\public_htm l\admin\files.p hp on line 6
Notice: Undefined variable: myclass in F:\Facebook\fur niture11\DataMi ning\public_htm l\admin\files.p hp on line 6
success writing to file
Comment