PHP header () Usage tips
The following is a detailed description of the use of the header function:
Regardless of how many headers the page has, it executes the last one, but conditionally, for example:
This will jump to Baidu
The role of the
Summary of PHP configuration issues
In the use of PHP+APACHE+MYSLQ programming, there are often a more troublesome problem, is to configure the php.ini file.
?
Question 1: Fatal error:call to undefined function mysql_connect () in. .
Print out
Strange! No one will help you.
Please be patient to look down, help me analyze and analyze.
First of all, the file is UTF-8 encoded, the host is also Linux. After many Tests-
Now with the two host is the Chinese name Network and win the net, the
PHP notes (6)-Array add element
Today I learned a new way to add an element to the PHP array.
Previously always added with the push () function:
$arr = Array (); Array_push ($arr, El1, El2 ... ELN);
?
But in fact there is a more direct and
Introduction to PHP Gdchart
Gdchart is a class library for pecl. This means that it is an extension of the C language. Although PHP does not have a default installation Gdchart, it can be compiled if you want to use it.
Gdchart the biggest
The difference between empty, isset, is_null in PHP
Empty
If the variable is a non-null or nonzero value, empty () returns FALSE. In other words, "", 0, "0", NULL, FALSE, Array (), Var $var, undefined; and objects that do not have any properties
PHP Verification Code and picture inconsistency problem
Today encountered a strange problem, the previous few days backstage also login well, today in the log in when the "Verification Code and picture inconsistency" problem, the user name and
PHP File Upload Download
1. php.ini configuration??
?
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Resource Limits; resource restriction ;;;;;;;;;;;;;;;;;;;;;;;;;;; Maximum execution time of each script, in seconds; Http://php.net/max-execution-time;
Merging of the PHP implementation arrays
Recently, make a report that requires that you merge these lines if a few items are the same, and add the number items to the display.
First consider iterating over the array, comparing the last item in the
40 Tips for getting PHP code to fly (improve PHP efficiency)
1. If a method can be static, then declare that he is static, the speed can be increased by 1/4;2.echo is more efficient than print, because Echo has no return value, and print returns
pdf2swf Chinese Conversion
The problem occurs when PHP calls pdf2swf to convert Chinese PDF.
According to the online download of xpdf and Chinese fonts. But Chinese still can't be displayed when converting.
Hint Error: Invalid charid 16757 for
PHP Smarty Cache usage
First, use the cache?To turn on the Smarty cache, simply set caching to True and specify Cache_dir.Use Cache_lefetime to specify the cache lifetime in secondsTo generate multiple different caches for the same page,
Find a regular expression that matches a qualified ID
The best solution to match this ID!--------------------------$s = ' your string ';p reg_match ('/
References:
/id= "([^"]*) "/
References:
/id= "([^"
Configure PHP to support curl
Today installed Zen Cart appeared curl not compiled problems, Internet search, problem solving.
Curl is a file transfer tool that works with URL syntax in the command line mode.
It supports many protocols: FTP, FTPS,
PHP completely eliminate Warning:cannot add header information-headers already sent in ...
Solution:
1) For those who have permission to edit php.ini
Open the php.ini file (you are better than I know where your php.ini is) and
debugging PHP programs with NetBeans + Xdebug
A few days ago found through the notepad++ DBGP plug-in combined with PHP xdebug extension can be implemented PHP file debugging, at the same time, the introduction includes a single-step debugging,
PHP Download file
PHP download files encountered in two ways
First Kind
$file = ' data/upload/file '. exe ';
@header ("Location: $file"); exit;
This method is not advisable. Because there is no type of file to tell the browser to download, if 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