Timestamp problems and character set encoding problems
Source: Internet
Author: User
Timestamp and character set encoding problems $ time = time (); $ unixtime = date (& quot; Y-m-dH: I: s & quot ;, $ time); this gets the server time... I am using a foreign server .. how can I change the above two sentences to adjust the time ?? Another question is about timestamp and character set encoding.
$ Time = time ();
$ Unixtime = date ("Y-m-d H: I: s", $ time );
This gets the server time... the foreign server is used now... how can I change the above two sentences to adjust the time ??
Another question is, is there such a piece of code? after running, you can set the browser encoding ....
For example, if I want to add a script on the webpage... after clicking it, I can set the browser encoding to utf8...
------ Solution --------------------
Date_default_timezone_set is designed to provide good local time for visitors in different time zones.
If you must provide Washington time to Moscow, it may be you that triggered the war.
Header ('content-type: text/html; charset = xxx ');
Attackers can force the browser to interpret text using the specified character set.
------ Solution --------------------
Output before using header (); function
Use ob_start ();
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.