Jump to content

Fwrite Problem


Cod-nes
 Share

Recommended Posts

How do I write this into a file?

<?php$file=fopen("config.php","w");$pass=md5($ap);$info="<?phpfunction showfooter(){$copy=true;$title=\"test\";$aq=\\"http:\/\/test\\";if($copy=true){echo \"Powered by <a href=\\"$aq\\">Something</a> - Something 2009\";}else {echo "something here";if(file_exist(\"footer.php\")){include(\"footer.php\");}}}?>"fwrite($file,$info);$fclose($file);?>

(Only a part of the file.)As you can see I need another slash. Two of these: \\. But they cancel themselves out or something that I get Parse error: syntax error, unexpected T_VARIABLE on the line of: $aq=\\"http:\/\/test\\";

Link to comment
Share on other sites

It works. Thanks. ^^ The file config.php gets created perfectly but there's this strange problem when I fwrite the infomation to the file. I get "Fatal error: Call to undefined function: ()". Is there a way to stop functions from running when we fwrite them into files?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...