修改一下 PHP 代码, 用于POST 文本数据

WBOY
Release: 2016-06-23 14:09:34
Original
847 people have browsed it

修改一下 PHP 代码, 用于POST 文本数据

echo file_put_contents($_POST["name"],$_POST["content"],FILE_APPEND);
?>

这段代码用于文本 post 数据(运行正确),文件保存在该段php代码文件所在的文件夹,我想改变一下,把post上来的数据保存在另外一个独立的文件夹,比如 叫做 TXTFILE 的文件夹,如何修改呢?


回复讨论(解决方案)

echo file_put_contents('TXTFILE/' . $_POST["name"], $_POST["content"], FILE_APPEND);

echo file_put_contents('TXTFILE/' . $_POST["name"], $_POST["content"], FILE_APPEND);

Thanks

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template