Common functions
The code is as follows
Copy Code
Get domain name or host addressecho $_server[' Http_host ']. " "; #localhostGet Web page addressecho $_server[' php_self ']. " "; #/blog/testurl.phpGet URL
Polymorphism of a class
1. Polymorphism of the introduction and advantages.2. Operator: instanceof.3. Simple application of polymorphism.
1. Introduction and advantages of polymorphism
Description: Polymorphism is the third characteristic of
The Substr_replace () function replaces part of a string with another string.
Usage
Substr_replace (String,replacement,start,length)
Note When the string contains Chinese, garbled characters will appear without special handling.
The
Windows system switch PHP error prompt
If you do not have permission to modify php.ini, you can add the following code to the PHP file:
The code is as follows
Copy Code
Ini_set ("Display_errors", "on");Error_reporting
function hidden () {
var obj = document.getElementById (\ ' layer1\ ');
Obj.style.display=\ ' none\ ';
}
function Mymenushow (obj,btn,past)
{
document.getelementbyid ("submenu"). Innerhtml= " Create a new Folder New text File Cut
[Original]php+ajax to realize the simulation win file management system
This tutorial by the original site, reproduced please specify the place
Author: www.111cn.net
Email: drise@163.com
qq:271728967//
We have already talked about the role of
First, Introduction
If you have any knowledge of unix/linux, you should know that most of them bring in C and C + + compilers, gcc and g++ respectively. UNIX uses these compilers in many places, such as program installation and make. With some
Multi-File upload is a basic PHP application, the relevant knowledge to everyone in detail, I have a limited level, but also please give more advice. Everybody progress together.
Upload files HTML input tag in the file type after the name to add [],
Running external programs that only root users can run in PHP has always been an old problem and is difficult to implement using conventional methods. This is because, in general, PHP is a module of APACHE, that is, PHP is a part of APACHE, and
Step 1: Use the json_encode () function to convert data to json data. The code is as follows:Copy code // JSON format data is represented by arrays in php.$ Arr = array ('Firstname' => iconv ('gb2312', 'utf-8', 'sincerity '),'Lastname' => iconv (
Several problems need to be solved to refresh the browser using phpIf the browser of the client is closed, the program may be terminated. Solution: ignore_user_abort can still run normally even if the page is closed.If the program runs continuously,
The code is as follows:Copy code Login user name: Password: Cookie retention Time: browser process save for 1 day save for 30 days 365 days Bytes -------------------------------------------------------------------------------
The filemtime () function returns the last modification time of the file content.If successful, the time is returned in Unix timestamp format. If it fails, false is returned.SyntaxFilemtime (filename)$ Path = "a.txt ";If (file_exists ($ path )){ $
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