how to write php code to a file with php

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

    You can do like this :-

        
                                  
                            I like the color ".$_SESSION['color']."!!!! 
                        
                     ";
    
        fwrite($ourFileHandle,$written);
    
        fclose($ourFileHandle);
    
    ?>
    

提交回复
热议问题