Modify the PHP code for POST text data-php Tutorial

Source: Internet
Author: User
Modify the PHP code, which is used to modify the PHP code for POST text data.

Echo file_put_contents ($ _ POST ["name"], $ _ POST ["content"], FILE_APPEND );
?>

This code is used for text post data (run correctly). the file is saved in the folder where the php code file is located. I want to change it and save the post data in another independent folder, for example, how can I modify a folder named TXTFILE?


Reply to discussion (solution)

Echo file_put_contents ('txtfile/'. $ _ POST ["name"], $ _ POST ["content"], FILE_APPEND );

Echo file_put_contents ('txtfile/'. $ _ POST ["name"], $ _ POST ["content"], FILE_APPEND );

Thanks

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.