On the Internet, I saw someone using PHP + MYSQL as a visitor's check-in book. At that time, I thought it was very useful, so I also wanted to create one. However, MYSQL is a little useful, so it creates a text-based visitor check-in book. Its
Install php using the apache module in WIN98Foolboy@chinaren.com★Related Software:Mod_php4-4.0.1-pl2.zipPhp-4.0.1pl2-Win32.zipThe above software can be downloaded from www.php.net or www.phpuser.com.Note that the two versions must be the same,(The
Avoid repeated page elements"This is really good," you may think, "My website is mainly composed of a large number of static pages. Now I can delete their public parts from all pages. It is too much trouble to update these public parts. In the
7. 1. Standard FunctionsThere are more than 1000 standard functions in the standard php release package. These standard functions are built in the system and can be directly used without user creation.For example:Copy codeThe Code is as follows:Echo
Share an actually used function:Copy codeThe Code is as follows:/* More stable than file_get_contents! $ Timeout is the timeout time in seconds. The default value is 1 s. */Function curl_get_contents ($ url, $ timeout = 1 ){$ CurlHandle = curl_init (
I. Analysis of conversion principle from Chinese characters to decimal characters A Chinese Character in GBK encoding consists of two characters. The method for obtaining a Chinese character string is as follows:Copy codeThe Code is as follows:$
In addition, the vigorous SQL Injection is also widely used in PHP, so to ensure security, PHP code writing is one aspect, and PHP configuration is even more critical.
We manually install php. The default configuration file of php is
1. Write a PHP program named test. php. The content is as follows:Copy codeThe Code is as follows:$ Fp = fopen ("test.txt", "a + ");Fwrite ($ fp, date ("Y-m-d H: I: s"). "success! \ N ");Fclose ($ fp );?> The program writes it boldly. It's okay to
Array_slice () Definition and usage The array_slice () function extracts a value from the Array Based on the Conditions and returns it.Note: If the array has a string key, the returned array retains the key name. (See example 4)Syntax Array_slice
Array_key_exists () Definition and usageThe array_key_exists () function checks whether a specified key exists in an array. If the key exists, true is returned; otherwise, false is returned.SyntaxArray_key_exists (key, array)Parameter descriptionKey
Three easy steps1) configure function Add an input for each field you want to include in your filterCopy codeThe Code is as follows:$ This-> widgetSchema ['name'] = new sfWidgetFormFilterInput (array ('with _ empty' => false ));$ This->
Of course, this article is not about researching Chinese search engines, but about using PHP as an in-site search engine. This is an article in this system.The word segmentation tool I used is the open-source ICTCLAS version of the institute of
1. Definition and display of stringsDefinition: marked "",''Display: echo () and print (), but print () has the return value, 1, while echo () does not, but echo is faster than print (), print () can be used in compound statements.2. String
1. Run the PHP program using IIS
1. first download PHP. Here I download php5.2.14 (if it is a later version, php5isapi may not be found. dll, the related configuration method is temporarily ignored), it is recommended to download the zip package,
Copy codeThe Code is as follows:/* PHP Object-Oriented Programming** PHP5** Array and object: both belong to the PHP compound type (one variable can store multiple units)** Objects are more powerful than arrays. They not only store multiple data,
For example:The first number is: 1.When you look at the first number, you can say 1, then the second number is: 11.Looking at the second number, you can say 2 1, that is, the third number is 21.Looking at the third number, you can say 1, 2, 1, and 1,
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