Author: Well Middle Moon
Java is a very powerful programming tool, its extension library is also very useful, this tutorial, mainly on how to use PHP invoke powerful Java class library (classes). To facilitate your study, this tutorial will
The most common applications are in user login and some API data exchange scenarios.The author contains some of the more classic PHP encryption and decryption function code, to share with you. Encryption and decryption principle is generally through
This is a brief introduction to compiling PHP and its extended memcache, and it is recommended that you read the official document (address) before reading the following. Here we take php5.3 as an example.
First, the compilation environment
Select
PHP filter special characters and SQL anti-injection codeMethod OneFilter ', ', SQL nameAddslashes ();
Method Two, remove all HTML tags
Strip_tags ();
Method three filters may generate code
function Php_sava ($STR){$farr = Array ("/s+/","/]*?) >/
There's been a very hot question recently--print or sort the two ordered arrays. Just see this problem when also a bit of Mongolia, the best algorithm must use the orderly characteristics.
Think of a will find it is not very difficult, if the array
There are a lot of functions in PHP that we rarely hear about, but they have very useful functions, such as glob (). Many people want to simply traverse the directory, if you know this function, will be twice the effort.
Glob is included in the
The number of rows affected by an update operation in MYSQLI can be returned in two ways:
1. Returns the number of rows matched
2. Returns the number of rows affected
By default, the value returned by Mysqli_affected_rows is the number of rows
The first step in working is to get the data out of Excel. Here I use an open source PHP processing Excel class: Phpexcel. The details of the project are http://phpexcel.codeplex.com/.
I am currently using the phpexcel1.7.3 version, after
RSS reader for PHP and AJAXRSS reader is used to read RSS informationAllows quick RSS viewing of news and updatesAjax rss readerIn the following example of AJAX, we will show that the content of an RSS reader does not need to be refreshed when
I. Small orderHTML is easy to learn and common. Common PHP programs are embedded in the HTML language. However, as WEB applications become more and more widely used, the weakness of HTML becomes more and more obvious. The emergence of XML makes up
Most of the thumbnails generated by the website are scaled in proportion. Let's take a look at the fixed image size today. "> the image size will automatically fill in the blank space if it is not enough. For more information, see. Error_reporting
Command line mode for imagemagic to remove image backgrounds: The code is as follows:Copy code Convert-size 140x80 xc: none-fill gray-gravity northwest-draw "text 'copyright'"-gravity southeast-draw "text 'copyright'" miff: -|
Echo is a PHP statement, print and print_r are functions, and the statement does not return values. The function can return values (even if it is not used)Print () can only print values of simple type variables (such as int and string)Print_r () can
SolutionMethod 1: edit php. ini in php. ini.Find "memory_limit". If not, you can add this parameter at the end of the file. The following are some configuration examples:Memory_limit = 128 M; you can change M to any value you want to set.Method 2:.
Obtaining PHPThis section has details about PHP download locations, and OS issues. 1. Where can I get PHP? 2. Is there any pre-compiled binary version? 3. Where can I get an optional PHP Extension Library? 4. What can I do to make these libraries
Method 1 of double quotation marks output$ Str = 'I want to output double quotation marks "'; echo $ str; // The result is: I want to output double quotation marks"Method 2$ Str = "output double quotation marks" "; echo $ str; // The result is:
Php regular format IP address, hide the last one.Example The code is as follows:Copy code // Hide the last digitReturn preg_replace ('/(\ d + )\. (\ d + )\. (\ d + )\. (\ d +)/is ', "$1. $2. $3. * ", $ ip ); // The last number of hidden IP
// It's really boring. It's a strange idea. I want to re-use PHP to implement some encapsulated functions in PHP,// The following code mainly implements some string processing functions in PHP, and implements some PHP// None, but the same function
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