Easily parse XML documents with PHP 5.0 (2)

File: simpledocumentparser.php /** *========================================================= * * @author Hahawen (older youth) * @since 2004-12-04 * @copyright Copyright (c), Nxcoder Group * *========================================

PHP get URL address some function summary

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

PHP object-oriented Development, such as the multi-state detailed

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

PHP substr_replace Substitution String Some instances

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

PHP turn on and off error tips

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

[Original]PHP+AJAX implementation simulation win file management System 11

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 implementation simulation win file management system nine

// Original site: www.111cn.net Author: drise1 qq:271728967 // The top.function SendData (method,url,returnvalue,action) {//Save data Xmlhttp.open (method,url,true); Xmlhttp.setrequestheader ("Content-type", "application/x-www-form-urlencoded"

[Original]PHP+AJAX implementation simulation win file management system three

[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

C + + Applications executed through the Web in PHP

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

PHP multiple File Upload

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 [],

External programs that can be run only by the root user in PHP

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

Time and Date conversion in php

The code is as follows:Copy code Function Sec2Time ($ time ){If (is_numeric ($ time )){$ Value = array ("Years" => 0, "days" => 0, "hours" => 0,"Minutes" => 0, "seconds" => 0,);If ($ time> = 31556926 ){$ Value ["years"] = floor ($ time/31556926 );

Code for json format data conversion in php

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 (

Implementation of scheduled tasks in php

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,

Php code for converting numbers into currency formats

The code is as follows:Copy code Function format_money ($ STR){ If ($ STR = "")        { Return "";        } If ($ STR = ". 00 ")        { Return "0.00 ";        } $ TOK = strtok ($ STR ,".");If (strcmp ($ STR, $ TOK) = "0 ")        { $ STR. = ".

Php file download method

Download using the header method The code is as follows:Copy code Header ("Content-type: application/octet-stream ");Header ("Accept-Ranges: bytes ");Header ("Accept-Length:". filesize ($ file_dir. $ file_name ));Header ("Content-Disposition:

Php cookie login verification code

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 -------------------------------------------------------------------------------

Php uses iframe to implement the function of uploading non-refreshing files

resumable Upload of files Php codeSleep (2 );$ FileTypes = array ('jpg ', 'PNG', 'GIF', 'bmp ');$ Result = null;$ UploadDir = './upfiles ';$ MaxSize = 1 * pow (2, 20 );If ($ _ SERVER ['request _ method'] = 'post' & isset ($ _ POST ['sub ']) {$

Delete files and folders using php unlink and rmdir

svn

Php unlink and rmdir file and folder deletionDelete directories and filesFunction delsvn ($ dir ){$ Dh = opendir ($ dir );// Find all ". svn" folders:While ($ file = readdir ($ dh )){If ($ file! = "." & $ File! = ".."){$ Fullpath = $ dir. "/". $

Php filemtime regular file generation code

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 )){  $

Total Pages: 12780 1 .... 6863 6864 6865 6866 6867 .... 12780 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.