Use php to convert txt files into htm Code
/*
Batch converts all the. txt files under a directory to corresponding htm files. The htm file package contains css styles for ease of reading.
The
Php image watermark class, php adds the watermark function code for the image
/*
* Function: php image watermark (watermarks support images or text)
* Parameters:
* $ Groundimage: specifies the
The rapid growth of novice programmers
It's not a short time for me to study program design, but it's not always a long time. I always wanted to write something to commemorate it, but I was afraid that I would miss others' children. At
CentOS5.5 install LAMP (php environment) using yum
Cd/etc/yum. repos. d/
Cp CentOS-Base.repo CentOS-Base.repo.bak
1.2 replace the source open the CentOS-Base.repo with vi, clear the content, copy the following
Php file operation method Q &
$ Filename = "test. dat"; // defines the operation file
$ Delline = 3; // number of rows to be deleted
If (! File_exsits ($ filename )){
Die ("The specified file is not
Php captures and downloads all image files in css
If (! Is_dir ('IMG ') {mkdir ('IMG ');}
> 3. use the regular expression to obtain the relative address of the image:
If (preg_match ('/^ http. */', $
Batch change the encoding method in the meta information of HTML files
Sometimes, the encoding method of html files is different from that specified in meta information. you can use this code. This program depends on the jsoup and
Original Super Simple php Framework
Main ideas:Now php is widely used, and we are discussing oop and mvc. I don't know much about these things, and many places are not comprehensive. I hope you can correct them.The framework is also
PHP database operation base class (Singleton mode)
Database operation base classes written by yourself, including the most basic CURD operations, which can be integrated into the framework.
// Configuration file
$ Db =
Replace the callback content tag with a regular expression
Function my_wp_plugin_tag_action ($ content, $ tag, $ function, $ args = FALSE ){
// Match all regular expressions
Preg_match_all ($ tag, $
PHP database Toolkit
A very lightweight PHP database toolkit was born for two days (enough to prove very lightweight ).Two classes: one Connection to manage the PDO Connection (supporting multiple databases) and one QuickQuery to quickly
Obtain the visitor's operating system
Obtain the visitor's operating system
Function osinfo (){
$ OS = "";
$ Agent = $ GLOBALS ["HTTP_USER_AGENT"];
If (eregi ('win', $ Agent) & strpos ($ Agent, '95') {//
Extract variables submitted by pages and browsers
Extracting the variables submitted by pages and browsers is equivalent to enabling PHP. INI to enable global variables.
// Extract the variables submitted by the page and
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