Example of PHP exporting Excel format file

function Xlsbof () { Echo Pack ("Ssssss", 0x809, 0x8, 0x0, 0x10, 0x0, 0x0); Return } function xlseof () { Echo Pack ("ss", 0x0A, 0x00); Return } function Xlswritenumber ($Row, $Col, $Value) {

PHP Getting Started tutorial (19) PHP string processing

$STR = "Hello World". It ' s a beautiful day. "; Print_r (Explode ("", $str)); ?> Copy Code2, String Connection example: Defining strings $str 1 = "Hello world!"; $str

Implementation code for PHP MySQL database replication

-- --Database: ' Db_copy_old ' -- -- --The structure of the table ' article ' -- CREATE TABLE IF not EXISTS ' article ' ( ' ID ' int (a) is not NULL auto_increment, ' title ' text character set

An example of the function of collecting picture in PHP

An example of the function of collecting picture in PHP if ($url = = ") {return false;} $ext = STRRCHR ($url, '. '); if ($ext! = '. gif ' && $ext! = '. jpg ') {return false;} //Determine if!is_dir exists ($f Ilepath)? mkdir ($filepath): null;

Phpexcel Exporting Classic instances of Excel

/** * Phpexcel class Library export Excel file * edit:bbs.it-home.org * */ Require ' php-excel.class.php ';//reference to Google's Phpexcel class $result = mysql_query ("SELECT * from Dingdan"); Querying a

PHP-enabled MySQL class for read and write separation

/** * MySQL read/write separation class * $db _config = Array ( * ' master ' + = Array (' host ' = ' localhost:3306 ', ' user ' = ' admin ', ' passwd ' = ' 123456 ', ' db ' = ' stat '), * ' slave ' = = Array ( * Array ('

PHP uses the request header information to get the remote picture size

$fp = Fsockopen ("www.baidu.com", $errno, $errstr, 30); if ($fp) { This is where the request is set to head. $out = "Head/img/baidu_sylogo1.gif http/1.1\r\n"; $out. = "host:www.baidu.com\r\n"; $out. =

PHP MySQL and jquery implementation file download count

CREATE TABLE IF not EXISTS ' downloads ' ( ' ID ' int (6) unsigned not NULL auto_increment, ' filename ' varchar (not NULL), ' savename ' varchar (not NULL), ' Downloads ' int (ten) unsigned not NULL DEFAULT ' 1 ',

PHP Calendar Code PHP Implementation of efficient calendar code

/* * PHP Calendar function * edit:bbs.it-home.org */ @date_default_timezone_set (' RPC '); function Show_calender () { $starttime =microtime (); Processing Request Date $y = Isset ($_get["y"])? Intval

PHP Gets the folder size function

Get folder Size function Getdirsize ($dir) { $handle = Opendir ($dir); while (false!== ($FolderOrFile = Readdir ($handle))) { if ($FolderOrFile! = "." && $FolderOrFile! = "...") { if (Is_dir

PHP two-dimensional array ordering method (Array_multisort usort function)

$users = Array ( Array (' name ' = ' Tom ', ' age ' = 20) , Array (' name ' = ' Anny ', ' age ' = 18) , Array (' name ' = ' Jack ', ' age ' = 22) ); Copy CodeI want to be able to sort by age from small

PHP $$ Special variable (output variable string corresponds to the value of the variable)

$var 1 = ' nameofvariable '; $nameOfVariable = ' This is the value I want! '; echo $ $var 1; ?> Copy CodeOutput Result:This is the value I want!Articles you may be interested in:PHP variable variable security examples of PHP

How to implement PHP mandatory display error message

Error_reporting (E_all); Ini_set (' display_errors ', ' 1 '); Output error message to a text file Ini_set (' Error_log ', DirName (__file__). '/error_log.txt '); Copy CodeFor more information on error_reporting , please

Sample code for PHP to read and download CSV files

$fileName = "Prefs.csv"; Header (' Content-type:application/octet-stream '); Header (' content-disposition:attachment; Filename= '. $fileName); Header (' content-transfer-encoding:binary '); Header (' Content-length: '.

PHP traversal folder and implement edit and delete code

/* Traverse the folder; Function: (a) can delete the file (b) editable text, Web page file (c) can delete the folder, if the folder is empty (d) can establish files, folders, modify the folder name; */ $path = $DOCUMENT _root;

PHP support for the continuation of the file download type (source)

/** PHP Download class, support breakpoint continuation * date:2013-06-30 * Author:fdipzone * ver:1.0 * edit:ww.jbxue.com * Func: * Download: Download file * Setspeed: Set download speed * GetRange: Gets the

PHP read csv file contents of a few examples

$file = fopen (' windows_2011_s.csv ', ' R '); while ($data = Fgetcsv ($file)) {//reads a row of CSV each time Print_r ($data); This is an array, to get every data, access the array subscript can $goods _list[] = $data; }

Simple example code for the PHP date function

A small example of a php date function-bbs.it-home.org echo time ();//output from January 1, 1970 0:0 0 seconds to the current time (timestamp) echo ""; echo Mktime (23,56,59,12,20,1999);//output timestamp of the

phpMyAdmin importing a SQL file larger than 2M

Mysql->create database dbname;//Creating databases Mysql->create table tablename;//Creating tables Mysql->show databases;//Displays database information, which databases are available. Mysql->use dbname;//Select a database

A simple example of php file upload (beginner)

/** * php File Upload * 2013-11-30 */ if ($_post[sub]) { if (Is_uploaded_file ($_files[file][tmp_name])) {//Determine whether to take the temporary file and save inside PHP. A return value of 1 is true.

Total Pages: 5208 1 .... 3632 3633 3634 3635 3636 .... 5208 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.