how to write php code to a file with php

后端 未结 6 771
梦如初夏
梦如初夏 2020-12-20 18:37

For part of my website I need to be able to write php code to a file with php. For example:

$filename = \"RtestR.php\";
$ourFileName =$filename;
$ourFileHand         


        
6条回答
  •  伪装坚强ぢ
    2020-12-20 19:07

    Finally figured this out! I needed to escape my $ symbols! Like this:

    $written =  "
    
    
    
    
    
    ";
    

    Can't believe i didn't think of that ;)
    Thank you all!

提交回复
热议问题