现在的位置: 首页 > 综合 > 正文

php写文件(不转义引号)

2018年01月23日 ⁄ 综合 ⁄ 共 216字 ⁄ 字号 评论关闭

<?php

        if(file_exists($file)){
    unlink($file);
        }
        $james=fopen($file,"a");
        $content = stripslashes($content);    //控制引号的转义
        fwrite($james,$content);
        fclose($james);
        echo "保存成功!";

?>

【上篇】
【下篇】

抱歉!评论已关闭.