PHP UBB Code Editor program code

The code is as follows Copy Code /*PHP UBB Code Editor*/function Get_ubb ($ubb) {$ubb =preg_replace ("/([B]) (. *) ([/II])/", "2", $ubb);//replace bold word in B$ubb =preg_replace ("/([I]) (. *) ([I])/", "2", $ubb);$ubb

PHP User name password phone number legal judgment code

Function name: CheckUser ($C _user) Role: To determine whether a legitimate user name Parameters: $C _user (user name to be detected) Return Value: Boolean value Note: none The code is as follows Copy Code function

APACHE/NGINX/IIS/LIGHTTPD zblog PHP Program pseudo-static rules

Although the old Chiang tribe is built by WordPress, but to help customers corporate websites, as well as the usual toss more or zblog CMS, the former a little more users and plug-ins and themes and documents more, for a likely longer site or more

PHP folder and file Move class

This is a file directory move class, as long as in Listdir write your file to transfer the directory name moved on it, this folder and file move class, more suitable for the collection of multiple files to download the operation, such as in the

PHP break and Continue jump loop example

Sometimes, you might want to let the unconditional loop begin and allow the statements in parentheses to decide when to exit the loop. There are two special statements that can be used for recycling: interrupts and continuation. When a break

PHP common File Upload class-can upload multiple files

Class my_lib_upfile{ var $upfile, $upfile _name, $upfile _size;# $upfile temporary filename $_files[' tmp_name '], $upfile _name filename $_files[' name ', $upfile _size file size $_files[' size ']; var $new _upfile_name; # The file name after

PHP paging code, supporting the first 10 pages and the next 10 page pagination

PHP paging code, supporting the first 10 pages and the next 10 page paginationfunction Multlink ($currentPage, $totalRecords, $url, $pageSize = 10) { Global $func _message; if ($totalRecords $mult = '; $totalPages = Ceil

tutorial on installing Curl Extensions for PHP environments in Linux systems

If PHP is already compiled on the system, then you need to add a new extension.One way is to recompile PHP completely, another way is to compile the extensions separately, in extension form.The following is an example of installing Curl Extensions:1,

Linux root failed to start PHP-FPM problem resolution

fpm

CentOS 6.5 64-bit machine, with Yum installed PHP-FPM, because of special reasons need to start with the root account php-fpm, but found that can not start. 1, modify user and group # vim/etc/php-fpm.d/www.conf; Rpm:apache choosed to is able to

PHP calculates the difference between two time periods (in seconds, hour, day, month, and year)

Sample Code of the month difference between two time periods: The code is as follows:Copy code $ Yourdate = "2012-10-20 ";$ Yourdate_unix = strtotime ($ yourdate );Echo (date ("Y", $ yourdate_unix)-date ("Y") * 12 + (date ("m", $ yourdate_unix) -

Four Methods for simulating data submission using post in php

The code is as follows:Copy code  // Use a program to log on to a forum as an example.Function bbslogin ($ user_login, $ password, $ host, $ port = "80 "){// The post data to be submitted$ Argv = array ('cookie '=> array ('User _ login' => $ user_

Php obtains the browser name version instance program

Example 1 The code is as follows:Copy code Function get_user_browser (){If (empty ($ _ SERVER ['http _ USER_AGENT ']) {Return ''; }$ Agent = $ _ SERVER ['http _ USER_AGENT '];$ Browser = '';$ Browser_ver = '';If (preg_match ('/MSIEs ([^ s |;] +)/

Php only replaces the string that appears for the first time

Example$ Str = 'this is the string. I will only replace ABC once and I will not replace it. Is there any way to implement this. ';Replace the first abc with xyz. Because the string to be replaced is fixed, many people think of using the str_replace (

Php removes the specified html tag and content

String strip_tags (string str [, string allowable_tags])Disadvantages:This function can only retain the desired html tag, that is, the string allowable_tags parameter.In the yizero comment, I know other usage of the allowable_tags parameter of this

Codigniter Framework php post submitted to two addresses for implementation

The Codigniter framework uses jquery + ajax/"target =" _ blank "> The jquery ajax code is as follows: The code is as follows:Copy code "Method =" post "enctype =" application/x-www-form-urlencoded "name =" form1 "id =" form1 "> salary:

Php file directory operation functions

Mkdir (); functionPhp creates folders and files/// Create a folder The code is as follows:Copy code Function createdir ($ dir){If (file_exists ($ dir) & is_dir ($ dir) {// if this file exists and this file is a directory, no action will be taken.

How does PHPMailer send emails with attachments in php?

First go to http://phpmailer.worxware.com/download the latest version of the package2. After the download is complete, find the class. phpmailer. php and class. smtp. php classes in your own directory!3. Create a new php file named

Php quick way to get url parameters

 $ Url = "http://www.111cn.net.net/welcome ";$ Parts = parse_url ($ url );Print_r ($ parts );/*Array([Scheme] => http[Host] => www.111cn.net.net[Path] =>/welcome/)In this way, we have a lot of space to get the content of each part of the url.As you

Php traversal loop array implementation method

The article simply uses foreach for list each while to traverse arrays, including common one-dimensional arrays and two-dimensional array traversal methods. The following describes in detail how to use each function.*/$ Foreach = array (1, 2, 3 );$

Php file Upload move_uploaded_file function

SyntaxMove_uploaded_file (file, newloc) parameter descriptionFile is required. Specifies the file to be moved.Newloc is required. Specifies the new location of the file The code is as follows:Copy code php file upload function The code is

Total Pages: 12780 1 .... 2109 2110 2111 2112 2113 .... 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.