Common workarounds for Cookie invalidation in PHP development
Common workarounds for Cookie invalidation in PHP development
Cookies exist on the client side, not related to the server, note the case of your program, Linux is case-sensitive, and the configuration of the PHP tutorial, such as whether register_globals = OFF configuration on both sides of the same and so on.
The meaning of the @ and # symbols of PHP
function foo ($n) { $result = 1/$n; return $result;} echo @foo (0); A 0 error is generated in the function, but the error is not displayed when the @ is added. echo "End"; Output end
# comment Symbols
As with//, # is a single-line comment (Multi-line Comment */* */).
[email protected], even if the cookie is written in error, will not output, [email protected] Setcookie, the program output the following error message:
Warning:cannot Modify header Information-headers already sent by (output started at
After a search on the internet, found that the original in the Setcookie Setup can not have any output content, and then go to check the code, also did not find out in Setcookie before the output of things, in a bit, found the problem, the specific content as follows:
Today in the WordPress Chinese forum stroll around. The jar is not very popular, but there are a lot of good masters. Will write plug-ins and templates of the master and even edit files will not be mixed with beginners, the forum is so, haha.
See the same error in several posts, such as the one mentioned in this post: "Warning:cannot Modify header Information-headers already sent by (output started at c:progr Am fileseasyphp1-8wwwwp-config.php:1) in C:Program fileseasyphp1-8wwwwp-login.php on line 9 "
This is a very typical problem. WordPress program execution will first call the Wp-config.php class of configuration files, will also call wp-db.php to establish a database tutorial connection for later use. These files just do some setup and do not output HTML code. After the setup is finished, the program itself starts executing, and some programs use the header command to set an HTTP header. Because the HTTP header must be set before the HTML code output, otherwise the HTML code has already started to send to the client, HTTP has already been sent, cannot chase back to reset. WordPress Codex The question: How does I solve the Headers already sent warning? The article points out: To ensure that individual files-especially wp-config.php files that are often edited-are