This article mainly introduces how php connects to the access database and converts it to txt writing. it involves php connection, access database reading, and related operation skills for writing txt files, for more information about how to connect
PHP session custom processing PHP code
Session. gc_probability = 1 // The default value is 1. the larger the value, the better session. gc_pisor = 100 // The default value is 100. the smaller the value, the better. // The default value is one
Php code for static variables, members, and methods
_ File = $ file; $ this-> _ parse ();} private function _ parse () {// complete parsing in PNG format // and fill in $ _ width, $ _ height, and $ _ data} public function getWidth () {return $
Php operation XML addition, deletion, query, modification
I used xml to replace the database for a small website with a small amount of data.
The execution efficiency of this short code is too low. Inserting 1000 data records cyclically will time
Obtain the first letter of the Chinese character in the string and obtain the first letter of the Chinese character in the string (modified according to http://blog.csdn.net/iwebsms/archive/2004/09/28/119851.aspx)
The code may be bloated. I hope
We should share so many open-source things that we have learned from our predecessors and support simulating browser cookies.
We should share so many open-source things that we have learned from our predecessors and support simulating browser
PHP verification birthday php code
"; Print" valid time should be less than: $ max_year, $ this_month, $ this_day \ n"; Print" the time you entered is: $ year, $ month, $ day \ n"; If ($ year> $ min_year) & ($ year $ this_month) | ($ month ==$
Determine the browser type of the client
/*** Determine the browser name and version */function get_user_browser () {if (empty ($ _ SERVER ['http _ USER_AGENT ']) {return '';} $ agent = $ _ SERVER ['http _ USER_AGENT ']; $ browser = ''; $
Highlight the current page in the navigation bar of the website
-->
$velocityCount-->
-->
The current page of a website refers to the web page currently browsed by the user. the current page is highlighted in the navigation bar and
Phpwkhtmltow.wkhtmltoimage converts a webpage to a pdf or image.
Function convert ($ type = 'PDF ') {$ filename = time (); $ url = $ this-> input-> get ("url "); if ($ type = 'PDF ') {$ filename = "upload/tmp /". $ filename. ". pdf "; exec
In linuxshell, input enhello to return Hello, and vice versa. The English-Chinese translation of the command line version calls the Baidu translation API.
$ En how are you
How-> how to use
Are-> Yes
You-> you
$ En "how are you"
How are you->
Use PHP to generate personalized QR code images with logos
1. php code
$ Data = 'http: // www.putclub.com '; $ size = '200x200'; $ logo = '. /1.jpg '; // the logo image in the middle // Use google api to generate a QR image before the logo is
Prohibit IP addresses in a region from accessing the website, and do not filter the search engine's spider php code.
Function get_ip_data () {$ ip = file_get_contents (" http://ip.taobao.com/service/getIpInfo.php?ip= ". Get_client_ip (); $ ip =
& Quot; perfect & quot; anti-XSS anti-SQL injection code
"Perfect" anti-XSS anti-SQL injection code injection
Haha, I 've sent a paragraph before, and then again. the organization thinks that the two codes in this project are very good and can
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