When you encounter a problem in PHP learning,Use the GD library drawing to set the font path variable:Putenv (' gdfontpath=c:\windows\fonts ');$fontname = ' Arial ';$bbox =imagettfbbox ($font _size,0, $fontname, $button _text);
Hint: Unable to find
1. What is a daemon
A daemon is a process that is detached from the terminal and runs in the background. The daemon is detached from the terminal in order to avoid the information that the process is performing on any terminal and the process will
The simplest PHP statement imports the database *.sql file into the database
Copy Code code as follows:
$sql =file_get_contents ("Text.sql"); Read the SQL statement as a string into the $sql
$a =explode (";", $sql); Use the explode ()
One, data caching
The data cache mentioned here refers to the database query cache, every time you visit the page, you will first detect the existence of the corresponding cached data, if it does not exist, connect the database, get the data, and
Php+ajax detection of user name or mail registration is already existing in the forum or membership system is a common important function. This paper describes the implementation method of this function in the form of an instance. The specific steps
Today in the 64-bit red Hat Enterprise Linux as Release 4.7 Compile PHP5.2.6 error, MySQL is used by the RPM method installed, PHP compiled code as follows:
If you want to enter a large enterprise for the bottom of the development of the Internet must have a clear understanding of the technical principles, such as the Apache implementation principle. The language aspect since is the PHP development
At present, there are many people who learn PHP, many of the friends who do PHP training always ask such a question: What is the PHP connection function implode?
PHP can split the string into a group, but also can be connected to the array of
1.array_merge () Merge
Example
$array = Array (' A ' => ' BB ');
$array 2 = Array (' B ' => ' cc ');
$array 3 = Array_merge ($array, $array 2);
Output is
Array ([a] => BB [b] => cc)
It's all right because it's all arrays, and if we're
1, the input information to verify the class (mainly used to verify the user name, password, duplicate password, mailbox, can add other functions)
Copy Code code as follows:
/**
* Validator for Register.
*/
Final class
There are several commonly used asynchronous file upload functions, such as the use of the IFRAME frame form, Ajax function effect, as well as the flash+php function, the following describes the Ajax and iframe asynchronous file upload function
Google translation today, found a good thing: Google Translate_tts, call this API can hear English pronunciation,
Saves yourself the hassle of uploading audio files.
I used PHP to write a method called to save the audio file locally.
As follows:
PHP code to read the file header to determine the type of file, support pictures, RAR, exe and other suffixes.
Case:
Copy Code code as follows:
The path to the picture can be d:/upload/11.jpg and so on absolute path
$file = fopen ($
The concept was first approached from Drupal, and at first it was a bit of a habit-why not write a closed tag? This feeling is not perfect, for people with obsessive-compulsive disorder is very not adapt to it! Later, in the work encountered because
Static variables exist only within the scope of a function, and static variables live only on the stack. Normal variables are released after the function ends, such as local variables, but static variables do not. The next time the function is
How to keep the session in PHP and some of the thoughts arising from it the recent project, which has a relatively large form, the user to complete it takes a lot of time, many users spent painstakingly completed, a submission found session expired,
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