What are php file operation functions?
/*
* 1. get the path file name
* String basename (string path [, string suffix])
* 2. obtain the Directory of the path
* String dirname (string path)
* 3.
How to remove null values from php arrays and delete null values from php arrays
Php array removes small functions with null values. php recursive functions delete elements with null values in the array and learn them together.
Php image watermarks support transparency of watermarks and background transparency
/**
* Watermarks: Supports the transparency settings of text image watermarks and the transparency of the watermark
The technical director talked about how programmers write code.
To judge whether a programmer is a good programmer, it mainly depends on the code he writes, because the most important thing for a programmer is to write code.Even if you
Added an image watermark using the phpimagecopy function.
// Add an image watermark (random position) to the background image. The background image format is jpeg and the watermark image format is gif.
Code example for php to read the configuration file
/**
* Read the configuration file
* By bbs.it-home.org
*/
If (! Isset ($ config )){
$ ARR = file ("admin. conf ");
Foreach ($ ARR as $
Understanding and learning PHP framework in all aspects
PHP has become the most popular scripting language for many reasons: flexibility, ease of use, and so on. For project development, we usually need a PHP framework to replace the
Learning how to use clone in php
Class Person {
Private $ name;
Private $ age;
Private $ id;
Function _ construct ($ name, $ age ){
$ This-> name = $ name;
$ This-> age = $ age;
Php page cache ob functions
Function page_init ()
{
$ Url = $ _ SERVER ['request _ URI ']; // suburl. this parameter is generally unique.
$ Pageid = md5 ($ url );
$ Dir = str_replace ('/', '
The efficiency of the sensitive word replacement algorithm is 4 times higher than that of str_replace (with 6 sensitive words)
Efficiency Comparison(12688 characters, replace once ):
Str_replace:0.109937906265 seconds
Php implements a simple calendar class
Echo"
Echo"
Echo"
Echo"
Echo"
Echo"
}
Foreach ($ weeks as $ value ){
}
}
For ($ I = 0; $ I day_week; $ I ++ ){
}
} Else {
}
}
$ I ++;
Php implements a simple calendar class
Class
Convert full-angle numbers into half-angle numbers
Convert full-angle numbers into half-angle numbers
// Convert the fullwidth number into a halfwidth number
Function GetAlabNum ($ fnum ){
$ Nums = array (
Use PHPExcel to export data to Excel in CI
Class Table_export extends CI_Controller {
Function _ construct ()
{
Parent: :__ construct ();
// Here you should add some sort of user validation
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