Powerful functions
This article provides 20 useful PHP class libraries. These 20 PHP class libraries include the icon library, RSS resolution, thumbnail generation, payment, OpenID, database abstraction, PDF generator, and other functions. The
Through
1. Framework
The framework is one of the most important issues for PHP developers. There are many ways to develop web applications using PHP. There are many open-source frameworks that can be used to help rapid development and maintain
// Send the 404 status code to the browserHeader ("HTTP/1.1 404 Not Found ");OrHeader ("HTTP/1.1 404 ″);
// Permanent redirectHeader ("Location: http://weizhifeng.net/"); // The default value is 301.// Temporary redirectionHeader ("HTTP/1.1 302
String realpath (string $ path) of the PHP path function returns the normalized absolute path name.
Realpath () checks whether the target file (or folder) pointed to by $ path exists, which is equivalent to calling file_exists ($ path ).
If the
Do you encounter the following situations during the process of Program Development: After you have spent a long time developing a PHP application, you think it should be a success. Unfortunately, when debugging, bugs are constantly discovered, and
Static PageThere are two methods: pseudo-static, url rewriting, and static. The following describesPHPStatic Page method.
In PHP website development, full-site or partial static processing is required for website promotion and SEO. PHP provides
People who are cautious about writing a program will still make mistakes. The following describesPHPAnalysis of these small errors.
These errors often confuse the PHP compiler. If developers cannot understand the meaning of the compiler error
Php umask function tutorial
Umask value(PHP 4 and PHP 5)Umask-changed the current umaskDescriptionInterpreted umask ([International $ mask])Set the umask value of PHP to mask and 0777, and return the old umask. When PHP is used as a server module
Php controls the iis 404 error page. This document describes how to use php to manage web site time when setting pages that cannot be found by 404.
Php controls the iis 404 error page. This document describes how to use php to manage web site time
Add watermark code modification to the fck upload image. You only need to find the editor/filemanger/conectors/php/commands. php file and replace the following php code with your commands. php file.
Add watermark code modification for fck image
The upload_tmp_dir parameter in the php tutorial configuration is compared. If the file is under this directory, move_uploaded_file will be moved. And the comparison is case sensitive, And/is different under windows. When parsing the php
Today, one of my machines suddenly sent a large number of data packets to the outside, which can be 1 GB or more per second. Although I used a policy to disable UDP packet sending, it took a lot of CPU, so I finally thought of a solution.
First look
The alternative to this problem is to rewrite the json_decode and json_encode methods of PHP json.
The solution to the lack of JSON packages for these two PHP files is mainly to convert arrays, strings, or objects into json data (a special structure
Php entry: strrchr instance tutorial
Definition and usageThe strrchr () function determines the position where another string occurs and returns all characters starting from this position to end the string.
If the character cannot be found,
Php has a ready-made function getimagesize used to obtain the image size. The specific function usage and code example
$arr = getimagesize("http://www.php100.com/html/php/hanshu/2013/0905/1.jpg");/** * 这里$arr为一个数组类型 * $arr[0] 为图像的宽度 * $arr[1]
Php tutorial to generate excel xls document
Method 1-use the HTTP Header
As described in MS Word, You Need To Format HTML/PHP pages using Excel-friendly CSS and header information
Add to your PHP script.Header ("Content-type: application/vnd.
Two example methods for parsing json data using php
Most popular Web services, such as twitter, provide data through open APIs, always know how to parse various transfer formats of API data, including JSON and XML.
$ Json_string = '{"id": 1, "name"
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