Example of how php outputs XML files using functions
$ Conn = new PDO ("mysql: dbname = lamp; host = localhost", "root", "123456 ");
$ SQL = "select id, username, phone, *** from user ";
$ Pdo = $
Allows Kohana to use a third-party template engine
The Kohana view layer is simple. the variable data is placed in the $ _ data array. Therefore, by inheriting the Kohana_View class and overwriting some methods, you can easily use a
Method 1 of traversing the tree
Recursive depth-first algorithm
Define ('Ds', DIRECTORY_SEPARATOR );
Function rec_list_files ($ from = '.')
{
If (! Is_dir ($ from )){
Return array ();
}
$ Files
URI processing functions
I wrote this function myself, and the technology is not very good. Therefore, please advise me if there are any inappropriate ones.
Function modifyUri ($ param = '', $ value = ''){
2 // Obtain the URI
Simple MySQL search functions
A quick and simple way to search a MySQL database.Example:MysqlSearch ('items ', 'title tags', isset ($GET ['Q'])? $GET ['Q']: '', Array ('columns '=>' * ', 'method' =>' OR ', 'extraSQL '=>' AND active = "true"
Obtain all links by reading the source files of a website.
Read the source files of a website and analyze the source code using regular expressions to obtain all links.
/********** Qiushuiwuhen (2002-5-20 )***********/
PHP Chinese string truncation function
/***** First, the CSDN Forum PHP Banzhu xuzuning (nagging) boss, supports three types of encoding: gb2312, gbk, and big.
The following code is used :***/
$
Another cache class
Cache class
/*
* Cache
* Author: many Cainiao
* Creation time:
* Example:
Include ("cache. php ");
$ Cache = new cache (30 );
$ Cache-> cacheCheck ();
Echo date
Delete files and corresponding folders
Delete directories and functions of the files contained
// Note $ dir file name eg: admin/runtime
// Delete the directory and the functions that contain the file
Function
Determine the access IP address
Determine the access IP address
Function getIP (){
If (! Empty ($ _ SERVER ["HTTP_CLIENT_IP"]) {
$ Cip = $ _ SERVER ["HTTP_CLIENT_IP"];
} Else if (! Empty ($ _ SERVER
Learn how to use phpserialize () and unserialize ()
The explanations of serialize () and unserialize () in the php Manual are: serialize-Generates a storable representation of a valueserialize-generate a representation of the stored
Share a PHP connection to sqlserver class
What we usually see most is the php connection to mysql class. today we will share with you a class for connecting php to SQL server. For more information, see.
Class
How can I add a new menu on the destoon shop management homepage?
How can I add a new menu on the destoon shop management homepage?You can refer to the following method:1. open/lang/zh-cn/home. inc. php and replace lines 9 and 10 with the
: The solution to some minor Intype problems: A: Select the Chinese font. if you have installed the font, it cannot be called. You can open Intypeuserpreferences in the installation directory. itConfig, font_name: Q: the code cannot be quickly
Add a watermark: The PHP class used to add a watermark to an image: Copy the code as follows: & lt ;? Php ** function: PHP image watermark (Watermark supports images or text) * parameter: * $ groundImage background image, that is, the image to be
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