Tonight, when you write the form validation class for the framework, you need to determine whether a string length is within a specified interval, and naturally think of the strlen function in PHP.
The code is as follows
When we write data to MySQL, for example:
Copy the Code code as follows:mysql_query ("Update table set ' title ' = ' Kuhanzhu ' s blog ')";That's going to go wrong. As with ASP, the database will be allergic to single quotes. And addslashes at this
Guidance: Most Web site performance bottleneck is not on the PHP server, because it can simply increase the number of servers or CPU to easily handle (for a variety of cloud hosts, increase the number of VPS or CPU cores more convenient, directly to
The PHP Custom function only allows you to return a value with a return statement, and when the return is executed, the entire function is terminated.
Sometimes when a function is required to return multiple values, it is not possible to output the
This article mainly introduces PHP to read the contents of the three ways, the need for friends can refer to the following
PHP three ways to read the contents of a file://************** the first way to read the ***************************** code is
Please complete the upgrade process within 19 days, otherwise the old program will not be able to play and upload. Because of the use of Ku6 audit mechanism, some old video failed to pass the audit, after the upgrade is completed, we will be placed
The topic starts with the Shopex first.
April 10 0 o'clock, the domestic well-known online store system development Enterprise Shopex announced that its Shopex single-store version of permanent free: Free download, free upgrade, free use, no use of
Recently encountered a very strange problem in the work, after using each of the functions of an array to traverse, and then pass the array as an argument to a function, inside the function again using each traversal parameter group. To illustrate,
Recently received a project by the hospital to do PHP research and support project development. Previously, there was no contact with PHP, here to get an idea of getting started.
1. PHP
PHP, hypertext preprocessor, hypertext preprocessor, a common
Set the default controller
adding configurations in/protected/config/main.php
' Name ' = ' auto ', ' defaultcontroller ' = ' auto ', ...
The default controller for autocontroller.php is configured above
Set Default action
Set in
If you do a addslashes () processing of the input data at this point, you must use Stripslashes () to remove the extra backslash when you output it. 2. For PHP Magic_quotes_gpc=off, the input data must be processed using addslashes (), but you do
The public platform has become the next goal for many developers. I am not so much attracted to this new thing. But recently a friend helped develop a performance query function in the public platform. So he studied in his spare time.
The main
Environment: Linux, Apache2, PHP5
Problem: Opening phpMyAdmin The following error occurred:
Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PH P installation properly.
The
First, check the permissions of the site directory.
Whether the upload directory has write permissions.
Second, php.ini configuration file
There are several places in the php.ini that affect uploading:
File_uploads open on must be turned
PHP object to array
Data is invoked across platforms in the project, using JSON or XML. JSON and XML objects need to be transferred to an array. You can use the following function.
/** * * Turn objects into groups * @param $object objects to go
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