1.__construct ()
Instantiating an object is called automatically. Call __construct when __construct and a function that has the class name as the function name are present, and the other is called without a back.
The function with the class name
first, the controller must be added to the verification code method admin/lib/action/loginaction.class.php
Knowledge Points:
1. Ob_clean function Use
2. Import method call think default class library
3. Image class Buildimageverify method use
The
Weibo speech has the word limit, its counting way is, Chinese count 2, English count 1, full-width character count 2, half-width character count 1.
PHP comes with strlen is the number of bytes returned, for UTF8 encoded in Chinese returns 3, does
Original address: http://127.0.0.1/onsite/index.php/welcome/index/abc123
Modified after address: http://127.0.0.1/onsite/abc123.html
Copy the Code code as follows:
Rewriteengine on
Rewritebase/onsite
Rewritecond%{request_uri}
Copy CodeThe code is as follows:
Require_once ("zend/loader.php");
Introduces the function class (INT) of the validator class and the verifier, and the custom interface class;
Zend_loader::loadclass (' zend_validate ');
Zend_loader::loadclass ('
The CodeIgniter supports caching technology to achieve the fastest speed. Although CI is already quite efficient, the dynamic content in the Web page, the memory CPU of the host, and the speed of database reading directly affect the loading speed of
But now this article may contain some expressions, we certainly can not directly extract src Road strength, so if the first is an expression picture, will extract the expression image as the cover, this time we need to write clear regular to exclude
Copy CodeThe code is as follows:
/*** Encryption and decryption classes* This algorithm only supports encrypted numbers. Compare the encryption decryption that applies to the ID field in the database, and the encryption based on the digital
There are several ways to codeigniter the HTML hazard code, the most common of which are the following:
1. You can choose to filter using the Htmlspecialchars () method.
2. $config[' global_xss_filtering ' = FALSE in the config.php file below the
When beginners thinkphp, many people do not understand the difference between execute () and the query () method, this article analyzes the difference between the two.
As you know, both the Execute () and the query () methods in thinkphp can enter
If you get a second $str[1] or $str{1}, it is not recommended to use {}, it is best to use []
Test as follows
Copy the Code code as follows:
Gets the last character of a character
$str = ' phpddt.com ';
echo $str [Strlen ($STR)-1]; M
Modify the
Copy the Code code as follows:
PHP line breaks for different systems
The implementation of line breaks between different systems is not the same
Linux and Unix use \ n
MAC with \ r
window to be different from Linux is \ r \ n
So the implementation
Find the relative path of two directories without limiting the path depth
Copy the Code code as follows:
/**
* Output $b relative path relative to $ A ($a)
* Unlimited path depth, no optimizations, just implementation functions
*/
function GetPath
Implementation code, copy-ready:
Header ("Content-type:text/html;charset=utf-8");
function Getrandpass ($length = 6) {
$password = ";
Add the characters you want to the following string, which is the number 0-9 and the 26 English letters by
For example, the following code:
Copy the Code code as follows:
echo ' hello\n ';
echo ' World ';
?>
The line break in the program \ n is output directly, and the workaround is to change the single quotation mark to double quotation marks:
Some of the win host IIS does not support. htaccess files, which I mean here is not local local words with Apmserv server can use. htaccess file, configure pseudo-static with Apmserv server environment can see PHP pseudo-static (URL rewrite mod_
GZIP Compression for IIS
1. First back up the IIS configuration file and copy the C:\Windows\system32\inetsrv\metabase.xml to a different backup folder. C:\Windows\system32\inetsrv\metabase.xml is the core configuration file for IIS, and 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.