Copy CodeThe code is as follows:
Public Function Captcha () {$font _dir = $_server ["Document_root"]. "Your_ttf_file.ttf"; Font Library$img _w = 58; Set Picture width$img _h = 20; Set Picture height$font _size = 11; Font size$angle _l =-10; Left
But on the server, many use Linux server, the source program uses UTF-8, so it is easy to produce character encoding problem.
If you just transcode the CSV file to UTF-8 so that there is no problem on the Windows Server,
On RedHat5.5, in the array
Sort () Definition and usage
The sort () function sorts the values of the given array in ascending order.
Note: This function assigns the new key name to the cells in the array. The original key name is deleted.
Returns TRUE if successful, otherwise
Array_sum () Definition and usage
The Array_sum () function returns the sum of all the values in the array.
If all values are integers, an integer value is returned. If one or more of the values are floating-point numbers, a floating-point number is
Array_key_exists () Definition and usage
The array_key_exists () function determines whether the specified key exists in an array, returns TRUE if the key exists, or false otherwise.
Grammar
Array_key_exists (Key,array)
Parameter description
Key is
There are two forms of STRTR:
String Strtr (String $str, String $from, String $to)
String Strtr (string $str, array $replace _pairs)
When the first type is used, the arguments $from, $to string lengths must be the same, otherwise the extra (either
The code is as follows
Copy the Code code as follows:
$dir = ' D:\Program files\resource\application\skin\png\\ ';//pay attention to the path here, the last to add two \, the first one means to turn, but this is easy to encounter other specific
Copy CodeThe code is as follows:
/*template.class.php@ Kang Shengweibo Template Extraction class think this template useful to spend some time independent out. by Rezhigin@ have a look at CTT this template is similar to Phpcms's template?? ^_^
Looking at the PHP manual, I found the following code:
Copy the Code code as follows:
function Test (){static $count = 0;$count + +;Echo $count;if ($count Test ();}$count--;}?>
The results of the implementation are as follows:
This is a
The most used non-array in PHP is, how is the array implemented? In the PHP internal array is implemented by a Hashtable, which uses the link method to solve the problem of hash conflicts, in the worst case, the complexity of finding the array
Copy the Code code as follows:
$arr = Array (345,4,17,6,52,16,58,69,32,8,234);$n = count ($arr);for ($i =1; $i The reason why $n-1 is because the array is calculated starting from 0Next is the first internal loop.for ($j = $n-1; $j >= $i;
First, the basic knowledge
This chapter briefly describes the internal mechanisms of some Zend engines, which are closely related to extensions, and can help us write more efficient PHP code.
1.1 The storage of PHP variables
1.1.1 Zval
This looks more humane, okay, on the code
Copy the Code code as follows:
Class Timeago{Static $timeagoObject;Private $rustle;Private $unit;Private Function __construct (){}Private Function __clone () {}public static function GetObject (){if (!
Copy CodeThe code is as follows:
/* Declaration of Class* 1. What are you going to develop, determine what class to write* 2. Members of the class must belong to this class* [modifier class's Keywords] class class name {* Member Properties:*
To illustrate:
In the Windows environment: Originally in the php4.3.0 running a normal program, in 4.3.1 why many error, the general tip is: notice:undefined varialbe: variable name.
For example, the following code:
Copy the Code code as
Copy CodeThe code is as follows:
/* pre-defined array:* AUTO global variable---Hyper global array** 1. Contains data from the Web server, client, run environment and user input* 2. These arrays are more specific* 3. The global scope automatically
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