First, we will learn how to create this object in javascr sans PT:
VaR XMLHTTP = new XMLHttpRequest ();
This line is simple
Code The XMLHTTPRequest object is created in Mozilla, Firefox, Safari, opera, and basically all non-Microsoft browsers that
Beauw.php, a useful PHP formatting ToolHttp://www.bierkandt.org/beautify/Http://pear.php.net/package/PHP_Beautifier/download
New people in the group recently, theyCodeIt seems uncomfortable when it is not very standard.
This tool is really easy to
A. php file, includingProgramStart character (), specificCodeIt is placed between the start and end. In order to facilitate future modification and program reading, traditionally, code should be divided according to certain regulations, while PHP
Segment first
Code
Copy codeThe Code is as follows:
$ Len = 15;
$ STR = "this news orArticleThe title is very long. You only need to display the first few words, and then use... to replace ";Echo strlen ($ Str) ?>
Knowledge about CHR (0:Null
Array_unique (PHP 4> = 4.0.1, PHP 5)
Array_unique -- remove repeated values from the array
Description
Array array_unique (array)
Array_unique () accepts array as input and returns a new array without repeated values.
Note that the key name remains
CopyCode The Code is as follows: $ Link = mysql_connect ("","","")
Or die ("unable to connect to MySQL Database". mysql_error ());
Mysql_select_db ("duyounet", $ link );
Mysql_query ("set names 'gb2312 '", $ link );
$ Day30 = Time ()-60*60*24*30;
$
CopyCodeThe Code is as follows: $ A = 1; // start
$ B = 2; // end
$ C = $ B-$ A; // count the total number of images that can be generated
$ AB = $ in ['number'] = 4; // number of digits
$ A_c = $ in ['hdcount'] = 50; // how many images are
Classic loop example
classic loop example For ($ counter = 1; $ counter {Print (" counter is $ counter \ n"); // print 6 times}?>
Advanced Application of advanced application of for /*** Print necessary instructions*/Print (" How many days
There is not much technical content here. I just talked about it in a simple way. (The following operations are based on PHP + MySQL + Apache.) How to implement your own PHP
Code Security and assurance
Program And server security is a very
Well, you may want to know why you want to use fasttemplates.
· You can change the appearance of your entire site in seconds· AbstractionProgramDesign, no spam htmlCode · Designers do not need to care about all the "fuzzy" code· Surprisingly
The same number in English
Header ("Content-Type: image/PNG ");
// Define the header and declare the image file, preferably PNG, without copyright concerns;
// Generate a new four-digit integer Verification Code
Session_start (); // enable session;
$
Arithmetic Operators
Operator name result
$ A + $ B addition $ A and $ B's and
$ A-$ B subtraction $ A and $ B
$ A * $ B multiplication $ the product of a and $ B
$ A/$ B Division $ A divided by the operator of $ B
$ A % $ B modulo $ A divided by
Save the following as test. asp
CopyCode The Code is as follows: $ Mysql_server_name = "localhost ";
$ Mysql_username = "root ";
$ Mysql_password = "password ";
$ Mysql_database = "phpzr ";//?? Why ??
$ Conn = mysql_connect ($ mysql_server_name,
First, cultivate your interest in PHP, and then learn more about PhP.
Program In fact, there are many advantages. Mainly list the following points.
PHP can do anything, such as collecting form data, generating dynamic webpages, or sending/receiving
Today, I got to the next level... first write one: (numbers are added)
CopyCode The Code is as follows: $ A = "10"; // connect "to the left
$ A + = "2"; // Add "on the right" to the left
Echo $. " \ n"; // here the result is 12, which means that
JS
Code As follows:
Copy code The Code is as follows:
// Maximum data volume
VaR Total = "100 ";
// Display volume per page
VaR pagesize = 10;
// Total number of pages
VaR pagenum = math. Ceil (total/pagesize );
// Generate navigation
Function
PHP File Processing
In the application of PHP files on the server, the related scope is not only the various connection and access operations between the user and the server database, but also the file processing functions built in PHP, to process
PHP, adapted to the ciphertext after simple encryption on the post
Copy codeThe Code is as follows: // Replacement: Encrypted replacement from the previous version
Function compress_func ($ match) {return strlen ($ match [0]). $ match [0] {0
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