Hegel has a famous saying: existence is reasonable. With this as an argument, the use of static classes must have its rationality. But extremes meet, once the code is too dependent on static classes, its deterioration of the outcome is inevitable.
1. Bad support for recursionRecursion is a mechanism by which a function calls itself. This is a powerful feature that makes some complex things very simple. One example of using recursion is a quick sort (quicksort). Unfortunately, PHP is not good
Similar to dreamhost such as host service providers, is to display the use of fopen. Use of PHP's curl can be implemented to support FTP, FTPS, HTTP htpps SCP SFTP TFTP, TELNET DICT file and LDAP. Curl supports SSL certificates, HTTP POST, http PUT,
Recommend a simple and practical zoom picture tool SimpleImage, refer to http://www.white-hat-web-design.co.uk/blog/resizing-images-with-php/
How to use:
Set wide height, unequal scaling
Copy CodeThe code is as follows:
Include ('
Use "= = =" To judge, as to the difference between it and "= =", in short, the former emphasizes that the "identical (same, identical)" type is also required, the latter requires "equal (equal)", the value of the same is OK. Or use strcmp to judge,
Yesterday encountered a problem, using the YII framework to write PHP script, more than 1 million db of data export, run, success.
However, when running to No. 490000, the script terminates, prompting the error "File size limit exceeded", so Google,
What is the difference between PHP function method_exists () and is_callable ()? In the design process of the PHP face object, we often need to make a judgment when calling a method whether it belongs to a class, commonly used methods are
1, the input information to verify the class (mainly used to verify the user name, password, duplicate password, mailbox, can add other functions)
Copy CodeThe code is as follows:
/**
* Validator for Register.
*/
Final class Registervalidator
Strip_tagsRemove the HTML and PHP tags.
Syntax: string strip_tags (String str);
return value: String
Function type: Data processing
Content Description
This function removes any HTML and PHP tag strings contained in the string. If the string of HTML
The relevant IP settings used in this tutorial are modified in your environment.
Update apt-get before using, because the server is basically a bare system
Apt-get Update;
Apt-get upgrade;
1 We use the root account to install, first switch to the
Recently, carefully read a lot about the cache of the article, there are program-level, non-program-level, memory cache, file cache and so on, feeling a lot of benefits, so to consolidate knowledge, strengthen the memory, oneself also move to write
Failed to open stream:no such file or directory problem Daquan, this article by the help of the small collection and collation, please retain the source when reproduced.
Case one:
(Failed to open stream:no such file or directory) the directory
A home for the guests (
bkjia.com
) TutorialToday, the fire small in the blog park to see such an example of "ajax+php mouse drag layer to any location and save in real time," very practical, especially reproduced to you webmaster, I hope to
Interface issuesThe main thing about PHP calling interfaces is using curl to crawl information
Copy CodeThe code is as follows:
$ch = Curl_init ();
curl_setopt ($ch, Curlopt_url, $url); URL address
curl_setopt ($ch, Curlopt_post, true); Whether the
PHP Warning:
Strtotime (): It is not safe for rely on the system ' s timezone settings. You is *required* to use the Date.timezone setting or the Date_default_timezone_set () function. In case you used any of those methods and you is still getting
demo.php:
Copy CodeThe code is as follows:
/**
* Read SQL file and write to database
* @version 1.01 demo.php
*/
Class DBManager
{
var $dbHost = ';
var $dbUser = ';
var $dbPassword = ';
var $dbSchema = ';
function __construct ($host, $user,
In recent days are doing a small CMS, with the picture upload, want to facilitate CodeIgniter upload class to achieve, but there are many problems in testing, I have to pay attention to the place to share!
Copy CodeThe code is as follows:
/*
Use session and cookie to save user login information at the same time
1. Database Connection Configuration page: connectvars.php
Copy CodeThe code is as follows:
Location of the database
Define (' Db_host ', ' 127.0.0.1 ');
User name
Define (' Db_
Ask:
I used the post for the method, but why not use the Get method?
Let's take a look at the difference between post and get pass values:
When the post transmits data, it does not need to be displayed in the URL, and the Get method is
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