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
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
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
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
PHP Collection csdn Blog Sidebar reading ranking
In the project to use the collected data, so first take CSDN blog to try. This library uses the simple HTML DOM (official website), which makes it easy to traverse HTML documents.
Find ('
thinkphp Notes--Open debug debug mode, Thinkphpdebug
Debug+trace mode can see the error message of TP during the development process, which can better help the developer to debug. But the debug mode is not simple to set up in the configuration file
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
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
PHP Best Practices for reading large files
PHP Read large file method we generally are a line to take instead of one-time to write all the files in memory, which will cause the PHP program to die, the following for everyone to organize an example.
PHP implements the method of reading large files,
In general, when PHP reads large files, we use the method is usually a line to take, rather than a single time to write all the files in memory, which will cause the PHP program to die, the
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
PHP 5.3 and 5.5 obsolete/outdated function collation
Do PHP believe all know, starting from PHP5.3 to join a new error level deprecated, will be discarded/expired. We have a version to come.
The functions that are discarded in php5.3 are:
How PHP reads Cookies
View Cookies on your browser
Let's take a look at what's saved in the browser. If you use IE5, there is a directory of cookies in the Windows directory, there are many text files, the filenames are similar to Wudong@15seconds[1
How does PHP turn on the Curl function?
If I do a test first, we php.ini.
Code
The code is as follows
$ch = Curl_init ();curl_setopt ($ch, Curlopt_url, "http://www.111cn.net");curl_setopt ($ch, Curlopt_header,
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 PHP mb_substr () function intercepts the Chinese string application example,
The substr () function is used to intercept strings, but there is a problem with Chinese characters, and mb_substr () and Mb_strcut functions can be similar to substr (
PHP implements web system Single sign-on
As users expand their needs, more systems are built up. To achieve a better user experience, user single sign-on is required. The so-called single sign-on, that is, when users log on one system, other
The three major automatic in thinkphp
Class Usermodel extends model{Protected $_validate=array (
You will also need to write the array below. An array is a validation ruleArray (' Validation field ', ' Validation rule ', ' ERROR hint ', '
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