Nonsense not much to say, directly on the code:
Copy CodeThe code is as follows:
Class Getpingying {
Private $pylist = Array (
' A ' =>-20319,
' Ai ' =>-20317,
' An ' =>-20304,
' Ang ' =>-20295,
' AO ' =>-20292,
' Ba ' =>-20283,
' Bai ' =>-20265,
'
Web site provides the function, is a lot of sites will often have features, shopping malls, forums and a number of common network disk site. Common Internet above, we also often heard that a site, such as the existence of loopholes, such as
1. Gets the repeating element in an array. The code is as follows:
A. Method One:
The code is as follows
function Array_repeat ($arr){if (!is_array ($arr)) return $arr; $arr 1 = array_count_values ($arr); $NEWARR =
This article is on the PHP bit operation of the simple permission design carried out a detailed analysis of the introduction, the need for a friend reference
1. Write at the frontRecently I wanted to write a simple thing about permission handling,
Ezsql is a very useful PHP database operation class. The famous open source blog WordPress database operation uses the Ezsql MySQL section. The database operation class supports almost all major databases such as: Php-pdo, MySQL, Oracle,
hotlinkingmeans that the service provider does not provide the content of the service itself, bypassing other beneficial end-user interfaces (such as advertisements) by technical means, and providing the end user with the service content of other
Binary method finds whether an array contains an element, is compatible with the pros and cons, and the code implements:
The code is as follows:
$searchValue = (int) $_get[' key '];
function search (array $array, $value)
{
$max = count ($array)-1;
[PHP]; PHP is also a constantly evolving tool, and its functionality is constantly being truncated.; And PHP.ini's settings change can reflect a considerable change,; It's good to study php.ini before using the new PHP version.;;;;;;;;;;;;;;;;;;;;
Method One
The code is as followsif (Preg_match ("/^d*$/", "4312")){echo "Full digital";}
if (Preg_match ("/^[a-z]*$/i", "FDSFDFD")){echo "Full letter";}
if (Preg_match ("/^[a-zd]*$/i", "fd4fd34")){echo "has numbers and letters.";}
Chinese
If your URL link is relative to the path "Static/mapi.css", you want to replace him in bulk with the absolute path "http://dev.baidu.com/wiki/static/map/cloud/static/mapi.css". Well, you can do this:
Write a php file and write the URL you want to
In fact, the method of implementation is very simple.
php; " >
This is only the most basic method, is not very practical, because the site is to be updated, to periodically regenerate the HTML
Here's how I use it:
if (file_exists ("xxx.html")
Determine if a string contains hyperlinks
The code is as follows
$str = "SSDSFSDFSDFSS";if (Preg_match ("/]*>|
]*>/i ", $str)){echo "The string has a hyperlink";}Else{echo "The string does not have a hyperlink tag"
Simplehtmldom_1_5Create DOM from URL or file$html = file_get_html (' http://www.google.com/');//Find All images foreach ($html->find (' I MG ') as $element) Echo $element->src. '';//Find All links foreach ($html->find (' a ') as $element)
More than 5.30 versions can be used, inheriting the features of the fast redirection of the previous version (individual classes, all using static calls), adding a very important function and properties to invoke the modules in other URLs and making
PHP is not allowed if there are multiple interfaces that have an identical method name and are not inherited
The following example:
php; " >
Interface a{
Public function x ();
}
Interface b{
Public function x ();
}
Class C implements a,b{
Public
PHP converts Chinese characters to Pinyin is one of the tasks programmers often need to operate, although this small function can play a big role, the following is the correct method of Chinese pinyin, we can learn from it.
Similar code on the
Today, when testing a PHP program, I found this problem:
Forbidden
You don't have permission to access/on the this server.
At the beginning I was using http://localhost/test.php test, did not find the problem, and later in the intranet test will
The class used today is called Fpdf,fpdf this PHP class allows you to use pure PHP (or, more specifically, no pdflib) to generate PDF files. It shows and accelerates the process of PDF documents in the programming language with PHP class. Features
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