Not much to say, the code is sent:
function Pinyin ($_string, $_code= ' gb2312 '){$_datakey = "A|ai|an|ang|ao|ba|bai|ban|bang|bao|bei|ben|beng|bi|bian|biao|bie|bin|bing|bo|bu|ca|cai|can|cang|cao |ce|ceng|cha
thinkphp Query MSSQL Database garbled reason is thinkphp default to UTF-8, and Msmsql database is Simplified Chinese version, stored is GB2312 encoding
Workaround:
1: Open Db.class.php in Thinkphp\lib\core, add it at the back2: Find function Select
In PHP to filter some special characters or illegal characters we can have a lot of ways, like the regular expression str_replace is a good way, like a carriage return, space, line can be used to solve.
The nearly responsible system module is
The data processed by the program is not always pre-designed with database thinking, or it cannot be stored with the structure of the database.such as template engine parsing template, garbage sensitive information filtering and so on.In general, we
This article to introduce a Drupal through the Curl post to send a file implementation, if you are using Drupal cms do not go into the reference oh.
It is well known that PHP's curl extension can be used to simulate form submissions. There is a
PHP Startup error
Copy CodeThe code is as follows:
[ROOT@ABC lnmp]# Service php-fpm start
Starting PHP-FPM eaccelerator:could not allocate 67108864 bytes, the maximum size of the kernel allows is 33554432 bytes. Lower The amount of memory request
Recently, when using Ratchet (a PHP websocket framework) to transform a PHP Web site, an error occurred:
"It is set to 1024x768, but you had descriptors numbered at least as high as 1266.
--ENABLE-FD-SETSIZE=2048 is recommended, and may want to set
Getting Started with PHP: Installing PHP workspaces separately in Windows systems
First, what is lamp?
Linux+apache+mysql+perl/php/python a group of open-source software that is often used to build dynamic Web sites or servers is itself a separate
First, what is easydiscuz! For Windows?
As you know and may be using the discuz! EXP, easydiscuz! For Linux, easydiscuz! For Windows is a fast, easy and high-quality build of the Windows Server platform developed by the discuz! system Environmental
REMOTE_ADDR can only get the IP that is set in the visitor's local connection, such as the 10 that is set in a university campus network. X.xxx. XXX Series IP, and this function obtains the LAN gateway egress IP address, if the visitor uses the
First, the working principle of Zendencode
People who use PHP know that it is a script programming tool, the program written by it, must be placed in the form of source code on the Web server, so we can not protect their own source. And you all
To write a PHP import CSV file method, all can be implemented how to import.But I encountered two problems importing, one is to write code on the windows when the test has garbled problems, and then resolved.The second is when it was submitted to
PHP is a server-side scripting language, mainly used for dynamic web development, is currently one of the most popular development languages. Node is a JavaScript toolkit for writing high-performance Web servers. This article compares the two,
Reproduce the problem with a piece of code first
At first glance, the results are puzzling:
Copy the Code code as follows:
$string =
Hello
World EOF;
$data = simplexml_load_string ($string);
Print_r
1. addslashesAddslashes escapes special characters in SQL statements, including ('), ("), (), (NUL) four characters, which are used when the DBMS does not have its own escape function, but if the DBMS has its own escape function, it is recommended
This article mainly introduces the PHP loop Create directory example, the principle is to constantly try to create the upper directory, and so on, the need for friends can refer to the next
The code is as follows: function Mk_dir ($dir, $mod = 0777)
Php-Some methods of performance optimization
0. It is quicker to use single quotes instead of double quotes to contain strings. Because PHP will search for variables in a string surrounded by double quotes, single quotes will not, note: only echo
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