calendar.class.php
Copy Code code as follows:
Class Calendar {
Private $year; The current year
Private $month; The current month
Private $start _weekday; The first day of the month corresponds to the week
Private $days; How many
In PHP, check if a link exists, there are two methods, one is to use curl, and the other isGet the response code for the header of HTTP, if 200 is OK, if it is 404, you can't find it, examples are as follows:
1) Using Get_headers:
The 2
For today's applications, the importance of journaling is self-evident. It is hard to imagine an application without any logging capabilities running in a production environment. The functions that a log can provide are varied, including error
Copy Code code as follows:
Function: Traverse and print all files in the specified directory
function Scan_dir ($dir _name, $dir _flag=1) {Static $FILE _count=1; Number of records file initial 1 directory name does not remember$FILE _count--
Why, then? Because the processing of the form has two kinds of get and post, how to pass all the do parameters in both forms, and to get it in the background through the same way has been a very confusing problem, today after a few hours of
Grammar
Str_pad (String,length,pad_string,pad_type)
Parameter description
String required. Specify the string to be populated.
Length required. Specify the length of the new string. If the value is less than the length of the original string, no
Here's an idea for me to apply the server's PHP environment configuration to the program, generate a license string, and then write the string to the licensed file code. Even if you move the program to a different server, the program will not run. I
Sometimes because of the work, their own needs, we will go to browse different websites to get the data we need, so the crawler came into being, the following is my development of a simple crawler and encountered problems.
To develop a reptile,
Although ASP is a good technology, but in the long run I believe that PHP in the future technology collar
DomainThere will be extraordinary performance.
I think there are seven reasons why PHP is superior to asp:
1, speed, speed, speed
When I
Define (' Discuz_root ', substr (DirName (__file__), 0,-7));
This is a constant that defines the forum installation root directory in Discuz. Now let's analyze this simple but very practical constant.
first of all, it is assumed that the absolute
Today, I encountered the Resizeimage function of GD to process the thumbnails of the jpg suffix file to prompt the image is not a valid JPG image and error
Domestic online Search A lot of information did not find an effective solution, so
The workaround is as follows:
PHP for Windows bugs
Reference:
The first is the possibility of:
Get rid of eaccelerator extensions in PHP
This will solve your problem, but it may increase the system burden
Because Eaccelerator is mainly to save the
First, the introduction
On the speed, static page than dynamic page for example PHP much faster, this is no doubt, but because the static page flexibility is poor, if not with the help of the database or other equipment to save the relevant
Official Handbook (http://us.php.net/manual/en/function.natsort.php)
Copy Code code as follows:
BOOL Natsort (array & $array)
This function implements a sort algorithm so orders alphanumeric strings in the way a human being would
You can modify the php.ini file in the case of:
1, modify the php.ini in the
Copy Code code as follows:
Session.save_hander = Memcache;
Session.save_path = "Tcp://host: port number";//For example: Session.save_path = "tcp://127.0.
A The first is the coding of PHP pages1. php file itself and the encoding of the Web page should match
A. If you want to use gb2312 encoding, then PHP to output headers: header ("content-type:text/html; Charset=gb2312″), static page add B. If you
This article describes a simple workaround for __autoload and smarty conflicts in PHP. Share to everyone for your reference, specific as follows:
First, the question:
Recently, in the project found that the PHP __autoload method is invalid.
Swoole is a PHP advanced Web development Framework, the framework is not to enhance the performance of the site, is to improve the efficiency of the development of the site. Minimum performance loss, in exchange for maximum development efficiency.
This article for everyone to share the PHP picture Verification Code Implementation code, share for everyone to reference, the specific content as follows
1. Verification Code Picture Generationcaptcha.php
1. Generate 100*30 size of 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