Before looking at some PHP framework source code, very strange in the file contains, will use DirName (__file__) to patchwork file path, do not know what the benefits, then finally found the reason.
Let's look at a simple example:
There are a,b,c
has been using XAMPP to build a local PHP environment, but also before the local xampp to build and install WordPress and how to let local xampp support rewrite redirection, but recently my xampp appeared a lot of supernatural phenomenon, first
php Get visitor IP address Rollup
In my time we need to get the user's real IP address, for example, logging, geographic positioning, the user information, site data analysis, and so on, actually get the IP address is very simple $_server['
Specifically as follows:
This code is very useful, if you download a file, the site provides a hash results, you can download the file to hash, to verify that the downloaded file is correct.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
This article mainly introduces the PHP database link class (pdo+access), the need for friends can refer to the PHP PDO Access links code as follows: Class Dbhelpclass { private $conn; Private $qxId; private $ret; function
This article mainly introduces the PHP format date example, the need for friends can refer to the following Code as follows://Format date static function FormatDate ($format, $datetime, $week = 0) { $datetime = $d Atetime > 3000? $datetime:
This article mainly introduces the commonly used escape functions, security functions in PHP, use these functions can filter most common attack means, such as SQL injection, the need for friends can refer to the
1. addslashes
Addslashes escapes
This article mainly introduces a simple way for PHP to export Excel without using Plug-ins, first get an array of the data that needs to be exported, and the format of the array is below. Then you define the file name and the style of Excel you
This article mainly introduces the use of PHP calendar, the following have effect map, we refer to the use of the bar
calendar.class.php Code is as follows:
Singleton mode is only instantiated once, which means that it is not possible to use the New keyword when instantiating, and here is the use of the example, you can refer to the use of the bar The following is a single example pattern code: The
two common regular functions in 1.PHP
A.preg_match regular functions, based on the Perl language
Syntax: Preg_match (mode,string Subject,array matches)
Description: Mode parameter----regular module, i.e. regular expression (syntax)
Subject
This article mainly introduces the implementation of PHP with the timeout function of the Get_headers function, this article directly gives the implementation code, the need for friends can refer to the
Code more, but relatively simple, a glance
This article mainly introduces the PHP Curl landing QQ After the user information to obtain the certificate error, the need for friends can refer to the
Tonight open Ecmall Mall QQ login function, in the callback error, file_get_contents function
jquery Uploadify is an AJAX-style batch image upload plug-in, in PHP using jquery uploadify is very convenient, please follow the methods and procedures described in this article, for your PHP program to increase the jquery uploadify plugin bulk
The goal of the websocket specification is to implement bidirectional communication with the server side in the browser. Bidirectional communication can expand the application type of the browser, if you want to use PHP to write WebSocket
This article mainly introduces the PHP detection useragent version of the example, the need for friends can refer to the following Code as follows: <?php define (' IE ', 1); Define (' FIREFOX ', 2); Define (' CHROME ', 3); Define (' OPERA ',
This article describes the use of jquery, PHP and MySQL to achieve a similar security guard firewall turned off the switch, you can apply this feature to the function of the opening and closing functions, the need for friends can refer to the
Php_imagick is a php extension that can be used by PHP to invoke the ImageMagick feature. Using this extension allows PHP to have the same functionality as ImageMagick, now let's look at how PHP installs Imagick under Linux.
Description: PHP
ThinkPHP implements the sign-in function, and thinkphp implements sign-in.
This article describes how thinkPHP implements the sign-in function. We will share this with you for your reference. The details are as follows:
Data Table:
Create table
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