PHP-Code:
<?php
   $file 
fopen('php_script.php','w');
   
fputs($file,'<?php $variable = ""; ?>');
   
fclose($file);
?>
Reicht dir das?