The code is as follows
Copy Code
/** File:SimpleImage.php* Author:simon Jarvis* copyright:2006 Simon Jarvis* date:08/11/06* link:http://www.white-hat-web-design.co.uk/articles/php-image-resizing.php** This are free software; You can
Note: Find php.ini in Windows directory Open edit, search Mbstring.dll, findExtension=php_mbstring.dll the front of the number, so the MB_SUBSTR function can be effective
Example
The code is as follows
Copy Code
$str = '
English:
The code is as follows
Copy Code
function Tourl ($STR) {$str = preg_replace ('/[^a-za-z0-9]+/', '-', $str);$str = Trim ($str, '-');Return Strtolower ($STR);}
Contains special characters:
Example
Comment on the expression using the label 1 to 60.
The corresponding picture path/public/images/face/1.gif to/public/images/face/60.gif.
The implementation method is to use the Preg_replace function to complete the display of the comment
This article illustrates the simplest method of string matching in PHP, which is implemented as follows:
The code is as follows
Copy Code
/*The simplest string matching algorithm PHP implementation methodT:ababcabcP:abc0.1
Note: The original name of this article is Creating a Multi-File Upload Script in PHP. I think this article is generally written, and the code is not very professional, but it is short, and I can't find a better article at a time, so I translated it.
Needless to say, you have to find the PHP configuration file php. ini :)Open php. ini, first find;;;;;;;;;;;;;;;;; File Uploads;;;;;;;;;;;;;;;;;Region, which has the following parameters that affect file upload:File_uploads = on; whether to allow
III. Some injection techniques, many of which are personal discoveries1. Skills in union selectUNION is used to combine the results of multiple SELECT statements into one result set. Columns listed in the select_expression section of SELECT must be
1. Comparison of examplesExample 1: The code is as follows:Copy code $ Var1 = 1;Function test (){Unset ($ GLOBALS ['var1']); } Test ();Echo $ var1;?> Because $ var1 is deleted, nothing is printed.Example 2: The code is as follows:Copy code
Garbled characters in uploaded Chinese name filesFind the following configuration code in ckfinder/config. php: The code is as follows:Copy code /*If you have iconv enabled (visit http://php.net/iconv for more information ),You can use this
Assume that the following three files exist: localhost/demo The code is as follows:Copy code C. phpRequire_once ("a. php ");Require_once ("demo/B. php ");B: demo (); a. phpClass{} B. php's content is interesting, because it has to inherit CLASS
Wwwroot // The absolute path of the website root directory is: F:/wwwroot-- Folder_a // folderFile_a_a.phpFile_a_ B .phpFile_a_c.php-- Folder_ B // folder BFile_ B _a.phpFile_ B _ B .phpFile_ B _c.php-- Index. php*************************************
Among the many predefined SERVER variables in PHP, $ _ SERVER ["REQUEST_URI"] is frequently used, but this variable is only supported by apache. Therefore, we need a more general method to obtain the value of REQUEST_URI. The code is as
The code is as follows:Copy code $ Arr = array ('Name' => 'chia ','Age' => 20);$ Jsonencode = json_encode ($ arr );Echo $ jsonencode;?> The result is as follows:{"Name": null, "Age": 20}Chinese is blank. Why? Let's take a look at it.Let's
The method is as follows:$ Arr = array (............) ; // Assume that an array with 10 thousand elements contains repeated elements.$ Arr = array_flip ($ arr); // you can delete duplicate elements.What is going on? Let's take a look at the role of
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