Use PHP arrays to automatically link the content of the article to the code

$keys =array ( Array (' Web effects ', '/js_a/js.html '), Array (' SEO ', '/seo/seo.html '), Array (' php ', '/phper/php.html '), Array (' JSP ', '/jsp/jsp.html '), Array (' ASP ', '/asp/asp.html '), Array (' ps ', '/fw/

Generate Short URLs

function base62 ($x) { $show = "; while ($x > 0) { $s = $x% 62; if ($s > 35) { $s = Chr ($s +61); } elseif ($s > 9 && $s $s = chr ($s + 55); } $show. = $s; $x = Floor ($x/6

How to generate a verification code using Zend_captcha

Class TestController extends Lyw0301_controller_action { Public Function init () { Parent::init (); $this->view->title = ' Test '; $this->view->baseurl = $this->getfrontcontroller ()->getbaseurl ();

Convert relative paths to absolute paths

relative path converted to absolute path Convert relative paths to absolute paths function Relative_to_absolute ($content, $feed _url) { Preg_match ('/(HTTP|HTTPS|FTP)://', $feed _url, $protocol);

Parsing of Java folders

Package ims.common.util;Import Java.io.File; Import Java.io.FileInputStream; Import java.io.FileNotFoundException; Import Java.io.FileOutputStream; Import java.io.IOException; Import Java.io.InputStream; Import Java.io.OutputStream; Import java.util.

PHP: Regular expressions for dealing with topics and object names in Weibo

$post _content = "@oschina and @twitter in the study of # Regular expressions with #php# # filter topics and object names"; $tag _pattern = "/\# ([^\#|.] +)\#/"; Preg_match_all ($tag _pattern, $post _content, $tagsarr); $

Examples of PHP compression and decompression class Pclzip

Require_once (' pclzip.lib.php '); $zip = new Pclzip ("Archive.zip"); $v _list = $zip->create ($_server[' document_root '), Pclzip_opt_remove_path, $_server[' Document_root '); if ($v _list = = 0) {echo ' exception: '. $z-

PHP Judgment in English characters (one more)

Seems to remember the previous one, I wrote it, today this is online, from: http://www.cnblogs.com/zcy_soft/archive/2010/12/13/1904791.html /* Chinese judgment problem, in fact, there are many knowledge, the underlying internal code,

Form Toolkit with Sync token

Say Shenzhen 2011 of the Universiade is not to come, so deep in the development of a volunteer service station, I was the youth League to serve. A small Form toolkit was written in the process. The validation feature was not implemented by me, but

Student Performance Management System

Basic functions: 1, to achieve the maintenance of basic information of students (increase and deletion), 2, to achieve the maintenance of course information (increase and deletion), 3, to achieve the management of elective courses (elective courses,

Get the physical (MAC) address of the machine card

/** Get the physical (MAC) address of the machine card **/ Class Getmacaddr { var $return _array = Array (); Returns an array of strings with MAC addresses var $mac _addr; function getmacaddr ($os

One way to traverse the tree

recursive Depth-first algorithm Define (' DS ', directory_separator); function rec_list_files ($from = '. ') { if (!is_dir ($from)) { return Array (); } $files = Array (); if ($dh = Opendir

PHP, associative array, deleting elements based on element values

After some modification and improvement of the effect $array 1 = Array ("A" = "green", "Red", "Blue", "Red"); $array 2 = Array ("b" = "green"); $result = Array_diff ($array 1, $array 2);//This is equivalent to deleting

php Send mail

This is to use open source project Phpmailer to achieve the mail, first download the file, I download it here is 5.1 version, and then put three class.***.php files into the project file, I first use is Gmail, but failed, the problem is

. How PHP generates static HTML files

. How PHP generates static HTML files 1, below use a method of the template! $fp = fopen ("templets.html", "a"); if ($fp) { $fup = Fread ($fp, FileSize ("templets.html")); $FP 2 = fopen ("html.shtml"

Let Kohana use a third-party template engine

The Kohana view layer is simple, and the variable data is placed in the $_data array. So inheriting the Kohana_view class and covering some of the methods makes it very easy to use the third-party template engine as the view layer.The example here

WordPress number of articles in a certain period of time

WordPress in a certain period of time the number of articles, the specific effect can be no cold blog view function num_posts ($days =1) {//$days is the set time of the day; Global $wpdb; $today = Gmdate ('

PHP Infinite Classification Parent-child tracing method

PHP Infinite Classification Parent-child tracing method Return all the leaf nodes Public Function Scannodeoftree ($result,& $array =array (), $parentId =0, $lv =0) { static $i = 0; if ((bool) $result) {

PHP Filter functions

PHP uses the filter extension to write parameter-handling classes.http://www.blags.org/php-security-filter-function/Exp:First introduce the fileInclude ' filter.php '$email = cfilter::email ($_post[' email ');Verify that the string is returned

PHP String Formatting functions

List of functions: convert_cyr_string() crc32() hebrev() hebrevc() money_format() number_format() Echo convert_cyr_string (' The string ', ' k ', ' I ');

Total Pages: 5208 1 .... 3621 3622 3623 3624 3625 .... 5208 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.