Hi I am trying to write to a file using fwrite()...
Can I use a variable inside fwrite? If yes then how to do that?
I have tried to use two variables $surl and $lurl but they don't work... Instead of creating a file with the name as the value of the variable, it actually creates a file $surl.php
Code:$fp = fopen('$surl.php','w' ); fwrite($fp, '<?php header("Location: $lurl"); exit; ?>'); fclose($fp);



Reply With Quote

Bookmarks