This article summarizes the PHP directory operation method. Share to everyone for your reference, specific as follows:
Directory Operations
new directory : mkdir (path, permissions, recursive creation)
Delete directory : RmDir ()
Mobile (renamed)
This example describes the Php namespace namespace usage. Share to everyone for your reference, specific as follows:
A namespace (namespace) is the equivalent of a function, a class, and an area, which makes it possible to require the same class on
PHP Code:
?
/*
* Name: cnkknd PHP Login Class
* Description: PHP for login class, based on MySQL
* Author: Daniel king,cnkknd@163.com
* Date: 2003/8/25
*/
Class Login
{
var $username; User name
var $userpass; Password
var $userid; User ID
var
Review
Cookies are a way for servers or scripts to maintain information on client workstations under the HTTP protocol. A cookie is a small file saved by a Web server in a user's browser that can contain information about a user, such as an
discuz!5.0 Forum display style PHP code highlighting plugin,
The PHP code syntax coloring, like a comrade PHP can easily see the code.
Also added the HTML code run function.
This plugin was modified on the basis of a previous comrade's discuz!4 PHP
First step. First from the article to all the with the right to dig out.
Copy Code code as follows:
$message//article content
Regular (this is not yet)
$reg = "/]*src=\" (http:\/\/(. +) \/(. +) \. ( JPG|GIF|BMP|BNP)) \ "/isu";
Just a cursory glance at the first page of the update on the class of the article (refers to the phpe of the http://www.phpe.net/articles/389.shtml), very good, suggested to see.
The kind of groping ~ ~ I spent half a year to understand the role of
URL Jump Code
1. Code:
? $url =$_get["url"];header ("Location:".) http://". $url);? > such as save for aaa.php, can realize aaa.php?url=www.baidu.com jump to Baidu effect.
This simple call to the default $_get variable. and PHP default jump location:
This example for you to share the PHP reflection api--using reflection technology to implement the plug-in system framework for your reference, the specific content as follows
hasmethod ($method)) {//check whether the specific method in the
Using Curl
You can use curl to implement a curl_file_get_contents function yourself
Curlopt_followlocation TRUE will redirect "Location:" in the HTTP header based on server return. (Note: This is recursive, "Location:" several times to
This article illustrates the simple way to implement multidimensional array sorting in PHP. Share to everyone for your reference, specific as follows:
Before doing a function, you have to put the data into a two-dimensional array and sort, and then
Upload Picture:
Copy Code code as follows:
if (!empty ($_files["img" ["name"])) {//Extract the File field content name and determine
$path = "uppic/"; Upload path
if (!file_exists ($path))
{
Check if there is a folder, if it is not
This article mainly introduces PHP to achieve multiple keyword highlighting function, you can achieve in the search time to highlight reminders, the specific implementation code as follows:
Project structure:
Search results: Highlighting
1, php.ini on the file upload instructions
2, File upload process
(1) Upload file Submission Form HTML code:
Adminstration-upoload new files
upload new files
upload a file
triggers the control, when the
In this paper, we describe the design mode of PHP and the implementation of single example mode. Share to everyone for your reference, specific as follows:
Design patterns simply say the solution to a particular type of problem
Factory mode:
The merge (merge) Sort method combines two (or more) ordered tables into a new ordered table. One disadvantage of merge ordering is that it requires the memory to have another array of size equal to the number of data items. If the initial array is
The looks like this:
';
The static public function eat () {echo ' static method eats ';
The Public Function intro () {echo $this->name; }} error_reporting (e_all|
E_STRICT); No object at this time!
Method can perform human::eat
Copy Code code as follows:
/*
$Id: phpzip.php
*/
Class Phpzip {
var $datasec = array ();
var $ctrl _dir = Array ();
var $eof _ctrl_dir = "\x50\x4b\x05\x06\x00\x00\x00\x00";
var $old _offset = 0;
function Zip ($dir, $zipfilename) {
if (@
First is the home page, which contains a text input and an IFRAME that displays the chat content, and a hidden IFrame is used to submit form forms:
Copy Code code as follows:
chat.php
Header (' cache-control:private ');
Header ('
If you are not familiar with the basic syntax of jquery, please search this site's tutorial resources. If you are unfamiliar with phpmailer usage, please see another article in this site, "Use the Phpmailer class library to send e-mail."
The first
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