Install the GD library file before using basic image creation functions. If you want to create a function using JPEG-related images, you also need to install the jpeg-6b, and if you want to use the type 1 Font in the image, you must install
Use the latest PHP syntax file and automatically complete the file (PHP
CodeThe Automatic completion function is disabled ).
Only zendstudio zendcodeanalyzer1.2.2 is integrated as a PHP Code Analyzer. Does not rely on the runtime environment of
I always forget which file I put a sentence in. I just killed all of them...
CopyCode The Code is as follows: If (! Isset ($ DIR) or empty ($ DIR )){
$ Dir = str_replace ('\', '/', dirname (_ file __));
Echo "". $ dir. " ";
} Else {
$ Dir = $ _ Get
1. Learn PHP in one weekFtp://ftp.cycu.edu.tw/CNA/Course... OS/040816_php_1.wmvFtp://ftp.cycu.edu.tw/CNA/Course... OS/040817_php_2.wmvFtp://ftp.cycu.edu.tw/CNA/Course... OS/040816_php_3.wmvFtp://ftp.cycu.edu.tw/CNA/Course... OS/040816_php_4.wmvFtp://
First:
PHP Section
CopyCode The Code is as follows: If ($ _ FILES ['file'] ['error']> 0 ){
Echo '! Problem :';
Switch ($ _ FILES ['file'] ['error'])
{
Case 1: Echo 'file size exceeds server limited ';
Break;
Case 2: Echo 'the file is too large! '
Note: The following functions do not use regular expressions.
The above are the three functions that match the first one to achieve the same purpose.
Function str_cut ($ STR, $ start, $ end) {// obtain the first match, with the highest
// [Warning]: do not modify it without permission
// Configure //-----------------------------------------------------------------------------------
-------
// Configure //------------------------------------------------------------------------------
Code Reuse
Include ()
Require ()
These two functions are used to reference files. The difference is that when processing fails, include () generates a warning and require () is a dense error.
Include_once ()
Require_once ()
These two functions are
Create a file as follows. Connect to the database in step 1st, write the file, and then read it.
CopyCode The Code is as follows:
$ Mysql_server_name = "localhost ";
$ Mysql_username = "root ";
$ Mysql_password = "";
$ Mysql_database = "DB ";
//
Author: xling
First, check the download of the xls file:
// Header ("cache-control: Public ");Header ('content-type: Application/vnd. MS-Excel ');Header ("content-Disposition: attachment; filenameappsreport.xls ");
If you do not add the first
1. TransitProgramInclude. inc
CopyCode The Code is as follows: Include_once 'include/base. php ';
$ Path = '';
$ Url = isbase: decrypt (urldecode ($ _ server ['query _ string']);
Parse_str ($ URL); // get the variable passed through the URL
This is where the RSS reading Function
Program On the basis
If an array string is output and the encoding problem is solved.
PHPSource codeAndCodeThe detailed explanation is as follows:
// RSS source address list Array$ Rssfeed = array ("http:
1. Purpose of this function: Remove repeated elements in the array and sort by key names
Function assoc_unique ($ arr, $ key ){
$ Tmp_arr = array ();
Foreach ($ arr as $ K =>$ v ){
If (in_array ($ V [$ key], $ tmp_arr )){
Unset ($ arr [$ K]);
}
301 definition of redirection
301 redirection (or 301 redirection, 301 redirection) is the header information in the HTTP data stream returned by the server when a user or search engine sends a browser request to the website server) indicates that
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