PHP's HTML code to filter submission forms may have code that is exploited to introduce external dangerous content. For example, there are times when a user submits a form that contains HTML content, but this can cause the Display page layout to be
Bom:byte order Mark UTF-8 BOM is also called UTF-8 signature, in fact, UTF-8 BOM has no effect on UFT-8, is to support UTF-16, UTF-32 added BOM, BOM signature means to tell the editor what encoding the current file, convenient for the editor to
The examples in this article describe how PHP regular expressions get all links to content. Share to everyone for your reference. Specific as follows: Here are two methods for regular PHP links that can be used to get all the links to the content
a class code for converting PHP solar to lunar calendar
A class for converting PHP solar to lunar calendar
Class Calendar
{
#农历每月的天数
var $everyCMonth =array (
0=>array (8,0,0,0,0,0,0,0,0,0,0,0,29,30,7,1),
This is a very useful distance calculation function that calculates the distance from location A to B using latitude and longitude. The function can return miles, kilometers, and oceans of three unit types of distance.
function
Class Httptool
{
/**
*//Get domain name or host address
* #测试网址: http://localhost:8081/test/testurl.php?id=5
* Return to localhost:8081
*/
Public Function GetHost ()
{
Return $_server[' Http_host '];
!--? php
$patterns = "/\d+/";//First type
// $patterns = "/\d/"; The second type of
$strs = "left:0px;top:202px;width:90px;height:30px";
Preg_match_all ($patterns, $strs, $arr);
Print_r ($arr);
10 super-useful PHP code Snippets [PHP] Code
1. Send SMS
Call the Textmagic API.
Include the Textmagic PHP Lib
Require (' textmagic-sms-api-php/textmagicapi.php ');
Set the username and password information
This code snippet allows you to prohibit certain IP addresses from accessing your website
if (!file_exists (' Blocked_ips.txt ')) {
$deny _ips = Array (
' 127.0.0.1 ',
' 192.168.1.1 ',
' 83.76.27.9 ',
' 192.1
$pdf _file = './pdf/demo.pdf ';
$save _to = './jpg/demo.jpg '; Make sure that Apache have permissions to write on this folder! (Common problem)
Execute ImageMagick command ' convert ' and convert PDF to JPG with applied settings
Recently a project using PHP as the front-end to provide data for the development language, in order to achieve the ability to sort alphabetically, the need to extract Chinese Hanyu Pinyin, this project wrote a Chinese pinyin script, script is
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