Yesterday, colleagues encountered a strange problem, is the following code, can not be validated by JSON, and can not be parsed by PHP's Json_decode function.
Copy CodeThe code is as follows:
[
{
"title": "",
"Pinyin": ""
}
]
Perhaps the smart one
If you use the Base64_encode and Base64_decode methods directly, the resulting string may not be applicable to the URL address. The following methods can be used to resolve the problem:
URL-safe string encoding:Copy the Code code as
In the syntax of the form element, enctype indicates the format of the submitted data
Use the Enctype property to specify the type of encoding the browser uses when sending data back to the server.
Below is the
For the day IP is not high or the number of concurrent is not a very large application, generally do not consider these! There is absolutely no problem with the normal file operation method. However, if the concurrency is high, when we read and
The D method should be used in a more numerous way, to instantiate a custom model class, is a thinkphp framework for the model class instantiation of a package, and implemented a singleton mode, support cross-project and group calls, the invocation
The usual functions for calculating string lengths in PHP are: strlen and Mb_strlen. When the word embox is an English character, the two are the same. Here the main comparison, the Chinese and English mixed in the time, two calculation
Recently in a cool dog music lyrics collection found cool dog music lyrics directly browsing are "garbled", their usual words are the LRC format of the text, this cool dog dedicated KRC format is clearly after special treatment, usually with a cool
Get all the subclass methods below the taxonomy:
static function Getmenutree ($arrCat, $parent _id = 0, $level = 0, $all =true) { static $arrTree;//Use static instead of global if (! $all) $arrTree = '; if (empty ($arrCat)) return FALSE; $level
can be used $str = Preg_replace ("/]*href=[^>]*>|]*>/i", "", $strhtml); This section to achieve the requirements, if you want more solutions, you can see the following.
1. Delete the hyperlinks in the content
Copy CodeThe code is as
One is not filtering the input data (filtering the input), and one is not escaping the data sent to the database (escaped output). These two important steps are indispensable and require special attention at the same time to reduce procedural errors.
A little story about JavaScript, JavaScript story
Mom: Netscape Company
Formerly: LiveScript
Renaming reason: Want to touch Java light
Affinity: Take a name called JavaScript, actually not related to Java
JavaScript Small Example
ThinkPHP3.1.3 version has some features, it is worth paying attention to, the following simple.
1, abnormal aspects of the improvement
The new version of ThinkPHP3.1.3 overrides the Exception class thinkexception (in fact, it is completely
The role of the 1.C methodA. Load settings user's configuration, stored in a static variable $_config in a C function
B. Read the user's configuration (read from $_congig)
2. Demand Analysis:
1. Setting variables
1. Two-dimensional arrayCopy the
For the Destoon template, the first thing to understand is the concept of two destoon:
Templates(template) and
style(skin). The template is stored in the System template directory, the style (image of the system interface, CSS file) is stored in the
The value must be obtained using the obj[xx] method for characters with a key name of numeric or abnormal variables (if there are spaces).
Copy CodeThe code is as follows:
Declaring JSON data$array = Array (' Result ' =>array ("all" = "90 queue",
VI. Main game Interface (frames.php)
frames.php file function is to display the main game screen, first look at the following code:
$InLogin = false; $XNova _host = $_server[' http_host '); $XNova _script = $_server[' Script_name ']; $Uri _array
Take the destoonV4.0 system as an example:
about/announce/file/config.inc.phpIndex.html
The above directory or file must set the writable permission correctly, and when the directory is writable, it must contain all subdirectories and sub-files,
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