Php does not POST but outputs data after refreshing. Solution
Source: Internet
Author: User
My php code is as follows: & lt; html & gt; & lt; head & gt; & lt; meta & nbsp; http-equiv = "Content-Type" & nbsp; content = "text/htm php refresh without POST, but output data
My php code is as follows:
Network Message Board
// Error_reporting (E_ALL &~ E_NOTICE );
Function write_message ($ file_name, $ message)
{
$ Fp = fopen ($ file_name, "a"); // open the file in append mode.
If (flock ($ fp, LOCK_EX ))
{
Fwrite ($ fp, $ message );
Flock ($ fp, LOCK_UN );
}
Else
{
Echo "file cannot be locked
";
}
Fclose ($ fp); // Close File Resources
}
// Customize a function to traverse and read files
Function read_message ($ file_name)
{
$ Fp = fopen ($ file_name, "r"); // open the file in read-only mode
Flock ($ fp, LOCK_SH );
$ Buffer = "";
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.