Basic usage of phpexcel class library
// Write an excel file
// Include class
Require_once ('classes/PHPExcel. php ');
Require_once ('classes/PHPExcel/Writer/excel2007.php ');
$ ObjPHPExcel
How to open a php file
How to open a php file
Before answering this question, let's first understand what php is.PHP is short for Hypertext Preprocessor. PHP is an embedded HTML language. it is a scripting language that executes
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
How to draw a circular chart in php _ phpgd Library
// 1. create a canvas
$ Im = imagecreatetruecolor (300,200); // create a real-color image. the default background is black and the image identifier is
Detailed explanation of PHP paging code (with instance attached)
// Establish a database connection
$ Link = mysql_connect ("localhost", "mysql_user", "mysql_passWord ")
Or die ("cocould not connect:"
Php paging code and paging call
Class Page {
Private $ total; // total records
Private $ pagesize; // The number of entries displayed on each page
Private $ limit; // limit
Private $ page; /
Php paging code. you can set the paging mode in the "allow" mode.
Class Page {
Private $ total; // total quantity
Private $ limit; // returns the mysql limit statement.
Private $ pageStart; //
Php regular expressions do not contain a string sample code
This article describes how to write a php regular expression that does not contain a certain string. a regular expression does not contain a specified string. For more
Php random verification code image generation instance details
/** Default homepage **/
Class DefaultController extends AppController
{
Public function index (){
$ Len = 5;
$ Str =
Phpsql injection attacks and precautions
// Supposed input
$ Name = "ilia '; delete from users ;";
Mysql_query ("SELECT * FROM users WHERE name = '{$ name }'");
Obviously, the command executed by the database
Php image cropping and scaling methods
/* Check whether the original file exists and obtain the information of the original file */
$ Org_info = @ getimagesize ($ img );
$ Img_org = $ this-> img_resource ($ img, $
How does the Sina SAE cloud platform use codeigniter database configuration?
$ Db ['default'] ['hostname'] = SAE_MYSQL_HOST_M;
$ Db ['default'] ['username'] = SAE_MYSQL_USER;
$ Db ['default'] ['password'] =
PHP deletes empty array values
Foreach ($ arr as $ k =>$ v ){
If (! $ V)
Unset ($ arr [$ k]);
}
?>
In addition, the self-feeling is quite good, but this efficiency is not very high. I
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
Solution to Undefinedindex and Undefinedvariable in php
This prompt always appears in the php project process. at first, $ act was used to accept the data from form post: $ act =$ _ POST ['AC'];This prompt always appears in the php project
Example of using functions to read XML files in php
Else
// Step 1 create the parser xml_parser_create (encoding );
$ Xml = xml_parser_create ('utf-8 ');
// Xml_parser_set_option-set options for
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