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
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
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
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
Merging the thinkphp configuration file to eliminate the implementation of code redundancy,
Many times when we use thinkphp to configure the site foreground and the site background database connection, are often separate in the foreground
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,
Implementing file Management System with PHP
/**
* @]class name[= IO
* @]class uri[= System.IO
* @]purpose[=
* This class is used to process the file system
* @]author[= snakevil (snakevil@qq.com)
* @]version[= 1.1.1
* @]create[= 17:13 2004-3-2
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,
A collection of PHP code optimizations
1. If a method can be static, then declare that he is static, the speed can be increased by 1/4;
2.echo is more efficient than print, because Echo has no return value, and print returns an integer type;
3. Set
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
How to Judge Chinese and English characters in PHP
PHP judges that the basis of English is the asii value of the character, while the asii value of the character differs depending on the encoding. In order to write a PHP program to judge the
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