XSLT is a very handy tool for translating XML, which is implemented through xsltprocessor, with many useful functions built into the XSLT, and only the Registerphpfunctions method that calls the Xsltprocessor instance, I We can use PHP's functions
In the development of PHP and MySQL inadvertently will appear in Chinese garbled, this is the database encoding and file encoding problem, the following we synthesized a lot of PHP in Chinese garbled solution.
PHP Chinese garbled sometimes occurs in
, UrlDecode () and Rawurldecode () decoding the string is UTF-8 format encoding, if the URL contains Chinese words, and the page set is not UTF-8, then the decoded string to be converted to normal display
PHP Tutorial Chinese URL codec detailed
Session refers to the time that a user has spent browsing a website, from entering the website to the browser closing, which is the time it takes for the user to browse the site. From the definition above, we can see that the session is actually a
Throw out a function compared to the higher paging class (for php5.x)
Workaround
Fear level is not high, so never let go of any code, this class I have used for a long time, recently with object-oriented method rewrite, apply to php5.x, specially
A very friend of mine will ask how the session works and what is the difference between it and the cookie, and below we give you a brief introduction about the working principle of the session, there is a need to know friends can enter the reference.
Recently a lot of friends are asking me if I can put my that word trojan hidden into HTML or pictures, in fact, a word trojan inserted into the PHP file is already very hidden, if you want to put in HTML files or pictures, then read the test report
In PHP character encoding conversion We generally use the iconv and mb_convert_encoding to operate, but mb_convert_encoding in the conversion performance is much worse than iconv oh.
String Iconv (String in_charset, String out_charset, String
File search is to use PHP to traverse the directory and then go to a file to get the name of the comparison, and then find the file we specify to stop traversing and display the file name and address to search.
Today to do a special function to
If you want to use PHP to add background tile watermark effect to the image, you must use a PHP plug-in to the instance, that is, using Imagick, he can add background tile watermark Effect Oh, below we provide an example code.
If you want to use PHP
Today to see a tutorial has written some regular expression usage, which mainly refers to the regular character segmentation, matching, find, replace and some of the introductory knowledge and common examples, so organized to share with you.
1.
This article to introduce to you a Php+mysql article views statistics and release time instances, if you need to do not go into the reference it.
A webpage can show "File upload Time" and "number of visitors", not only the history of the article,
Let's take a look at the PHP use openssl_verify verification Signature Instance program, hope this article will help you.
The code is as follows
Copy Code
!--? php /** * Verify signature * tobeverified to be verified
PHP graphics code generation codes and including Ajax verification instance application previously written verification code program is to provide the source code, but no real real graphics verification code generated to the verification instance,
Str_replace () function is used to replace the specified character, then we can just use it to filter the sensitive character ether to anti-injection effect, below I have summed up some methods for you to share.
PHP various filter character
This article with some of their own experience to tell you how hackers friends will use your database SQL vulnerability to download your database Oh, there is a need to reference this article.
Create a table in the database:
The code is
PHP to give Chinese watermark needs to do some simple processing, one is to convert characters into GBK, there is to load the Chinese font oh, with these two conditions in the picture and Chinese watermark is simple.
Example 1
The code
This code can be uploaded to the picture plus sharks can also scale the picture, the need for friends can refer to.
This code can be uploaded to the picture plus sharks can also scale the picture, the need for friends can refer to.
$uptypes
Compressing the page input is to remove all the unused characters, and then all the code together, so for the SEO is helpful, but for the code is very poor readability, we often see a lot of web sites to do so, if you want to manually spaces HTML in
It's all right. With a PHP AES encryption class program for YII extensions if you do not use the YII framework, the Code Yii::app ()->params[\ ' encryptkey\ ') is replaced by your corresponding default key.
AES encryption algorithm-algorithm
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