Home > Backend Development > PHP Tutorial > Solution to Chinese characters appearing in php mssql date_PHP tutorial

Solution to Chinese characters appearing in php mssql date_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-21 15:47:26
Original
939 people have browsed it

For example: after reading: 2005-12-23, the page will be displayed as: 2005 December 23, which brings a lot of inconvenience to the program. After searching some information, I found that php.ini has the date processing function by default.
The solution is:
The first method: define ini_set("mssql.datetimeconvert","0") at the beginning of the php document;
The second method: modify php.ini and find;mssql.datetimeconvert = On, remove the semicolon in front, change on to off, and restart apache

The third method: use SQL's convert() function to convert, such as:
SELECT id, title, convert( char(10),news_time,102) as publish_time, content FROM news

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/319935.htmlTechArticleFor example: 2005-12-23. After reading it out, the page will be displayed as: 2005 December 23, which gives the program Handling brings a lot of inconvenience. After searching some information, I found that php.ini has the date processing function by default. Solution...
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template