The code is as follows
Delete an illegal file under a specified folder function My_del ($dir) { if (Is_dir ($dir)) {//Open the specified folder if ($handle = Opendir ($dir)) { while (false!== ($file = Readdir
This article illustrates several common considerations for using static methods in PHP. Share to everyone for your reference. The specific methods are as follows:
1. Even if the method in the class is not declared with static, but it is not used to
Paste test code directly:
code is as follows
&nbs P;
class moshu{ public function Moshu () { e Cho ' Current class name: '. __class__. ""; echo ' Current method name: '. __function__. ""; The number of
English:
The code is as follows
function Tourl ($STR) {$str = preg_replace ('/[^a-za-z0-9]+/', '-', $str);$str = Trim ($str, '-');Return Strtolower ($STR);}
Contains special characters:
The code
1, we first click on the computer with the mouse Start menu, is the bottom left corner of the icon, and then click inside the Control Panel tool, click on the Control Panel can be pop-up window.
2, in the Pop-up Control Panel window,
How to use PHP to invoke the contents of a text file directly: first open a text file on the server through the file function, the returned $myfile will become the handle of the file operation, and then through the loop instruction, take out the
PHP generated two-dimensional code, personally think that the most commonly used in two, 1. Use Google's API to generate, 2. Use PHP QR code generation, two methods generated two-dimensional code is very clear, the effect is good. Here's how to
Do not want to test PHP every time you open a virtual machine, so on the computer with XAMPP built a test platform.
I have now taken my blog data to the local, ready to write a template of their own.
Because I'm used to building a folder for
This article mainly describes the PHP string in the invalid line break, can not wrap the solution, in fact, PHP is the double quotes and single quotes use problems, the need for friends can refer to the following For example, the following code:
This article mainly introduces the use of PHP to calculate the size of a directory, the need for friends can refer to theThe PHP CURL session COOKIE can invoke system commands, as well: The code is as follows: function Dirsize ($dir) {@ $dh =
The functionality that is documented in this article is similar to the order by in MySQL, where a requirement is encountered in the previous project. requirements: Get each of the 4 data from two different tables, then consolidate (Array_merge) into
If you are a lazy programmer, you may be annoyed to see the following code
Abstract class u{
}
Class U1 extends u{
public static function Create () {
return new U1 ();
}
}
Class U2 extends u{
public static function Create () {
return new U2
This article mainly introduces the PHP use of the GD library for the page to add watermark to the specific implementation, the need for friends can refer to the following Code as follows:
basic functions: Can log in, chat, record the number of online IP events, can control the font color chat, automatic conversion chat URL for the link address, can be customized chat room title, advertising information and so on. Use text as a
This article mainly introduces the method of passing the PHP array or object to JavaScript, and the friend who needs it can refer to theSearch the Internet for a number of methods, and finally adopted the way through the JSON string. Suppose there
Sometimes we want to reduce the database query to improve the performance of the program, because the data is not often changed, but it will not change for a long time, so we each connected database, will be the corresponding results in the form of
The main use is the sort function of PHP, Asort () and Arsort ().To reduce the coupling of the code, we encapsulate a function by sorting the key values in the array.1PHP2$array =Array (3Array'name'='AA',' Price'=1050),4Array'name'='BB',' Price'=4300
VueThink and thinkphpvuethink, an open-source development framework based on ThinkPHP 5.0 and Vue. JS 2.xVueThink Project Introduction
VueThink is a front-end separation framework based on Vue family bucket (Vue2.x + Vue-router2.x + Vuex) + Thinkphp.
Phpstudy does not support 64-bit php by default. phpstudy does not.
Note:
Phpstudy on windows is relatively simple,By default, all php versions are 32-bit., Such as the maximum value of int.
So from the php official site click to open the link
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