how to write php code to a file with php

后端 未结 6 823
梦如初夏
梦如初夏 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:00

    It seems relevant to mention php's HEREDOC in this context, e.g.:

    I like the color .

    FILE_CONTENTS; fwrite($ourFileHandle, $write); fclose($ourFileHandle);

提交回复
热议问题