<p class="sycode"> </p> <div class="code" style="position:relative; padding:0px; margin:0px;"><pre name="code" class="sycode">$str = '<?php return '."\n".var_export($data,true).';?>';$filename = 文件所在路径;$fp=fopen("$filename", "w+"); //打开文件指针,创建文件if(!is_writable($filename)){ die("文件:" .$filename. "不可写,请检查!");}file_put_contents($filename,$str);</pre><div class="contentsignin">登录后复制</div></div> <br>