Encountered in the middle of a problem is submitted to the Chinese file name directly into the header in IE will become garbled, the solution is to urlencode the filename first and then into the header, as follows.
Copy Code code as follows:
The example in this article describes how the Smarty template engine obtains data from PHP. Share to everyone for your reference. Specifically as follows:
Smarty can assign ($smarty->assign) variable types: All PHP-supported data types-basic data
This article is an example of how PHP automatically adds links to URLs. Share to everyone for your reference. The implementation methods are as follows:
Here automatically match the page URL, including Http,ftp, and so on, automatically add links
Due to its own shortcomings, the inheritance relationship has been buttoned up by experts on the "evil" hat. "Use delegated relationships instead of inheritance relationships", "Try to use interface implementations instead of abstract class
Today, the PHP upgrade from 5.3.28 to 5.3.29, found that the site is not open, prompted the "502 Bad Gateway", access to static resources can, but access to any PHP file will be 502.In fact, I have found this problem before, but have not found a
The examples in this article describe the RSS-generated classes for PHP implementations. Share to everyone for your reference. as follows:
Class RSS {var $title;
var $link;
var $description;
var $language = "en-US";
var $pubDate;
var
The example of this article summarizes two methods of PHP recursive deletion of the specified folder. Share to everyone for your reference. Specifically as follows:
Method One:
function Recursivedelete ($dir)
{
if ($handle = @opendir
Suppose you now have a picture file, and its server-side path is:
$path = "/www/mywebsite/images/myphoto.jpg";
1.pathinfo () functionThe PathInfo () function returns an array of file information containing four elements, namely, dirname, basename,
1, each page must open session_start () to use the session in each page.
2, Session_Start () initialization session, the first access will generate a unique conversation ID saved on the client (is based on cookies saved), the next time the user
Short links do not say, we have been clear, as shown below is a short link:
Sina Micro Bo Http://t.cn/SVpONM
Tencent Micro Bo Http://url.cn/302yor
Yun.io http://d.yun.io/PNri2v
Advantages of short Links: 1, Content needs 2, user-friendly 3, easy to
This example describes how PHP uses Strtotime to calculate the number of days between two given dates. Share to everyone for your reference. The specific analysis is as follows:
The Strtotime function of PHP is used to resolve the date-time
This example describes a method for PHP to check whether a string contains 7-bit GSM characters. Share to everyone for your reference. The specific analysis is as follows:
The following code checks whether a string contains any 7-bit GSM characters.
The example in this article tells you how to traverse an array using the Key,value,current,next and prev functions in PHP. Share to everyone for your reference. The specific analysis is as follows:
There are a series of functions in PHP for array
Share a standard PHP AES encryption algorithm class, where Mcrypt_get_block_size (' rijndael-128 ', ' ECB '), if it is easier to get it wrong without understanding the principle, you can pass Mcrypt_list_ The algorithms function looks at the
Phpinfo ()
Function Description: Output PHP environment information and related modules, WEB environment and other information.
Hazard level: In
PassThru ()
Function Description: Allows to execute an external program and echo output, similar to
Here are two ways to choose: First: Handwriting code. Second: Using HttpClient PHP class Library
The first method:
Copy Code code as follows:
? Php
$flag = 0;
The data to post
$ARGV = Array (
' var1 ' => ' abc ',
' Var2 ' => ' How
Introduced
The decorator pattern dynamically attaches responsibility to the object. To extend functionality, adorners provide a more flexible alternative than inheritance.
Mind Mapping
There is such a project to make a restaurant reservation
PHP forms are backed up after submission, and the contents of the form are emptied by default (when using Session_Start),
The workaround is to write the character output before the session_start ()
Copy Code code as follows:
Header ("
These days write PHP program, feel a lot of places than asp,asp.net,jsp conveniently, such as session use first get Session_Start (), file jump header use is also inconvenient ....
Maybe not familiar with some of the features of PHP, but write more,
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