PHP Copy all files in directory and directory

function copy ($from, $to) {if ($this->abspath ($to) = = "/") $to = $this->basedir; if ($this->dirname ($from) = = $this->dirname ($to)) $to = $this->dirname ...

PHP SMTP mail Bulk program source code

<?php/** * Send QQ mail via Phpmailer * @author Ray * @since 2009-08-07 * * Define (' __debug__ ', false); Define (' __psw_file__ ', DirName (__file__). '/smtp.dat '); Define (' Sleeping_email ', dirname (__file__) ....

Using fopen function to collect news page content and save it to local function

? //PHP News crawl by Neil Moomey. //You are free to use this code as your wish. //Please make sure you can get permission from the title from any website you grab. //You may need to write the title on your server to speed up the file. //grab from File or Web page source code website if (! $myFile =fopen (http://www.jzread.com, "R"))} {echo &q ...

PHP Common bubble Method and recursive sorting algorithm code

PHP Common sort bubbling and recursive sort algorithm code bubble sort algorithm function Bubblesort ($arr) {$n =count ($arr); for ($i =0; $i < $n $i + +) {for ($j = $i; $j <=-1 $j + +) {if ($arr [$i]> $arr [$j]) {$temp = $arr [$i]; $arr [$i]= $arr [$j]; $ ...

PHP gets URL parameter and domain name code

if (!isset ($_server[' Request_uri ')) {$_server[' request_uri '] = substr ($_server[' argv ')][0],strpos ($_server[' argv ') [0], '; '  + 1); }  /*  +-------------------------------------...

Length of mixed strings in PHP calculations

PHP calculates the length of the mixed string in English, Echo Ccstrlen ($str), ' <hr> '; Echo Ccstrleft ($STR, 3);   function Ccstrleft ($str, $len) #从左边截取中英文混合字符串 {$ascLen =strlen ($STR); if ($ascLen <= $len) return $str; $hasCC ...

in_array,trim,isset,unset,is_numeric function usage in PHP array

PHP in_array,trim,isset,unset,is_numeric function usage. Let's take a look at the tutorial on how to use these functions. In_array ($array) This function is to determine whether the current value is an array oh EX: $array = array (1,2); if (In_array ($array)) {die (' In_array determines that it is an array '); ...

PHP Common Date phase functions (date plus subtraction and conversion time)

PHP commonly used date function [date plus minus, two date difference, date conversion time Cut] The following code is some commonly used date processing functions, you can add and subtract two times, the difference between two dates, date conversion time cut. echo Date (' y-m-d ', Strtotime (' +1 d ', strtotime (' 2009-07-08 '))//Date days Add function echo Date ("y-m-d", ' 1246982400 '); EC ...

PHP converts HTML to text function

The article provides you with a PHP HTML Convert to text function Oh, if you like it. <?php if (!defined (' Dedeinc ')) {exit ("Request error!");} function Sphtml2text ($str) {$str = Preg_replace ("/<sty" (. */style&g ...

PHP character interception and image filtering function

This article free of charge for your friends to provide a PHP character interception and image filter function Oh, if you like to come in and see this picture filter regular expression test function msubstr ($STR, $start, $len) {$tmpstr = "";  $strlen = $start + $len; for ($i = 0; $i < $strlen; $i + +) ...

PHP Data paging and data display effect

<?php include_once (DirName (__file__). /.. /inc/conn.php '); Include_once (DirName (__file__). /.. /photo/inc/function.php ');?> <! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitions ...

PHP imports Excel files into the database code

We're using the excelfileparser to deal with this extension. Oh, <!. DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> <html xmlns=&q ...

PHP save Flash online photo sent photos

<?php//Save the image of the newspaper as head upload. Define (' Sd_root ', DirName (__file__). /'); @header ("expires:0"); @header ("Cache-control:private, Post-check=0, pre-check=0, max-age=0", FALSE); @header.

Development of WAP Web site PHP program writing considerations

Two years ago I have contacted the production of WAP website, today 3g came out now let's take a look at some small details about using PHP to write WAP sites. (1) Use " and "?>" to contain the WML program line written by PHP, in the format: ...... (program line);?> (2) Other WML tags and statement lines are declared using the Echo keyword of PHP, followed by the newline character "n" (as needed, plus multiple) for each WML line. Its basic format is: EC ...

PHP reads the contents of the file and saves it to the database

The function of this program is to read the directory TXT file, and then save to the data oh, it is so simple, let's take a look at how I have TXT file content saved to the MySQL data table. <?php include ('.. /boke/inc/re_conn.php '); Checkdir (' file/'); function Checkdir ($dir _path)//Traverse directory {if Is_dir ($dir _pat ...

Difference and example between Mt_rand and Rand functions in PHP program

Mt_rand and Rand function difference and example let's look at an example of the Mt_rand function.   function Roll () {return Mt_rand (1,6); echo Roll ();   function Roll ($sides) {return Mt_rand (1, $sides); echo Roll (6); Roll a six-s ...

PHP Regular expression get title keyword and content code

Collection in the current CMS are often used to Oh, let's take a look at the PHP regular expression of title, keyword, content code OH.   Gets the title $inarr = Array ();   Preg_match ("/<title> (. *) </title>/isu", $body, $inarr); if (Isse ...

PHP Judge user browser type with from page

function Chkre () {global $_server, $r _main;   if (Isset ($_server[' http_referer ')) {$u =parse_url ($_server[' http_referer ']); if ($u [' Host ']!=$_server[' Http_host ']) ret ...

PHP query Baidu included query code

PHP to provide PHP queries written query code download Oh, look at it very easy oh.  function Baidu () {global $murl, $furl;  $url = "Http://www.baidu.com/s?wd=site: $furl";  $page = file_get_contents ($url); $Page ...

PHP Message Board Admin-View Code

<meta http-equiv= "Content-type" content= "HTML; Charset=utf-8 "/> <?php $lianjie = mysql_connect (" localhost "," root "," Xiaolie ") or Die (...).

Total Pages: 18 1 .... 5 6 7 8 9 .... 18 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.