php实施修改文件内容/html实施读取文件内容

Run Settings
LanguagePHP
Language Version
Run Command
<?php /** * Created by PhpStorm. * User: Administrator * Date: 2016/9/10 0010 * Time: 20:27 */ header("Content-type: text/html; charset=gbk"); if(isset($_POST['subbtn'])){//如果提交,就开始执行操作 //执行修改: $fileContent=$_POST['fileContent'];//获取输入框的内容 file_put_contents("a.txt", $fileContent);//执行替换 echo '修改内容成功!'; }else echo '修改内容失败!'; ?> <form method="post" action=""> <textarea name="fileContent" cols="100" rows="8"> <?php echo file_get_contents("a.txt") ?> </textarea> <button name="subbtn">修改内容</button> </form>
Editor Settings
Theme
Key bindings
Full width
Lines