traverse all files and folders under a folder
function List_dir ($dirpath) {
if ($dirpath [strlen ($dirpath) -1]!= "\ \") {$dirpath. = ' \ ';}
static $result _array=array ();
if (Is_dir ($dirpath)) {
/**** First is the CSDN forum PHP xuzuning (nagging) boss, support gb2312,gbk,big three kinds of coding.
Here's the code: ***/
$len = 19;
$text = "How will the long title of the news show only a few words in front, followed by ..."
Example
Dco_get_district ("160149");
/*##################################
CONVERT POSTAL CODE to DISTRICT number and NAME
################################## */
function Dco_get_district ($postal) {
Restricted programs can only be browsed inside, the following is the PHP limit page can only be accessed from the browser code.In order to prevent their hard-working webapp was copy, want to restrict the program only in the inside, although the
Destoon Two-time Development walkthrough TutorialDestoon is the preferred solution for the open source business-to-business (e-commerce) portal based on Php+mysql.In this paper, the two development of Destoon is summarized as follows: first, the
Some data we do not want to be seen by others, want to use other strings or numbers instead, disguised as unrecognized statementsThis is only a cryptographic operation for one or more simple data.Let's take a look at this code, without introducing a
Destoon Integration Ucenter After the registration page does not jumpUsually use Ucenter to do mediation, add multiple applications and then have multiple sites have the ability to log out synchronously. Ucenter Add application is not difficult,
Here's how to share some of the most common algorithms that are implemented with PHP.1. Bubble sort
function Bubble_sort ($arr) {
$n =count ($arr);
for ($i =0; $i
for ($j = $i +1; $j
if ($arr [$j]
iis PHP fastcgi problem require problem with path caching require series function contains the same relative path as
Problems with PHP fastcgi under/*iis
Require path caching issues
Require series functions
PHP Gets the first letter function of Chinese pinyinTransfer from www.54dev.com
/** * @param unknown_type $str * @return 取得汉字的首字母 */function getfirstchar($str){ $fchar=$str[0]; //判断是否为字符串 if(ord($fchar)-->=ord ("A") && Ord
. 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"
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
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