PHP to write Excel file implementation code

This article introduces the implementation of the code in PHP to write Excel files, including the title and content. Refer to a friend who needs it.PHP writes Excel files, including headings. This is often used in daily development, such as a number

A workaround for PHP file to read in the array with spaces

/** * Read configuration file * Edit:WWW.JBXUE.COM */ $encodename = ' existence of characters '; $lines = @file (' ske.txt '); Var_export ($lines); if (In_array ($encodename, $lines)) The reason for

Website development that little thing

After learning HTML and the basis of PHP, writing this project also has a period of time, in the process of writing can be said to be more systematic learning of some things, but also more profound some so-called experience need to accumulate the

Sample code for PHP file download (prevent garbled Chinese file names)

/** * php File download code, Chinese no garbled * by bbs.it-home.org */ $file = "/tmp/Chinese name. tar.gz"; $filename = basename ($file); Header ("Content-type:application/octet-stream");

PHP 5.2.x array Operation details sharing

$arr = Array ("a" = = 1, "b" = 2, "c" = 3); Copy CodeIf this defines an array, it will report a compilation error: $arr = Array ("A" = 1, "b" = 2, "c" = 3); Copy CodeTherefore,

Details of the PHP 5.2.x output operation

!--? php $a = "Hello"; $b = "World"; echo $a, $b, ""; echo $a. $b. " "; print $a. $b; copy code Output: Helloworldhelloworldhelloworld But this will result in a compilation error:

PHP randomly displays the specified text (if ElseIf usage)

/** * Randomly display the specified text * by bbs.it-home.org */ function Getrand () { $a =rand (1,5); if ($a ==1) { echo "It's sunny today!" "; }elseif ($a ==2) { echo "The Great Sun Today";

PHP Gets the implementation code for the MAC address

/** * Get the physical (MAC) address of the machine card * Currently supports Win/linux system * Editor: Bbs.it-home.org **/ Class Macaddinfo { var $return _array = Array (); Returns an array of strings with MAC

PHP Prohibit IP access (do not filter search engine spiders) method

/** * Block specified IP address access, but do not block search engine spiders * by bbs.it-home.org */ function Get_ip_data () { $ip =file_get_contents ("http://ip.taobao.com/service/getIpInfo.php?ip=". GET_CLIENT_IP ());

PHP Upload a picture function example

This article shares a PHP upload image code, through the built-in PHP function to achieve file upload, the need for friends reference.1,form form Section 2, upload the image file PHP code $max _size) {echo ' file is too large

PHP uses P3P to implement cross-domain method sharing

http://www.a.com/a_setcookie.php File Contents: http://www.a.com/a_getcookie.php File Contents: http://www.b.com/b_setcookie.php File Contents: Access via browser:

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;

PHP implementation of text template-based mail delivery class

This article introduces, PHP implementation of a mail sending class, based on text template to send mail, very good, have the need for friends to refer to the next bar.A PHP email send class, you can construct a simple message format, the effect is

Use of the mysql_fetch_array () function in PHP

This article describes the use of the mysql_fetch_array () function in PHP, which returns data query results as an array. Refer to a friend who needs it.PHP Data query result function: mysql_fetch_array () function. Returns the data query result as

PHP to determine if the network is connected to a small example

Detect if the network is connected function Varify_url ($url) { $check = @fopen ($url, "R"); if ($check) { $status = true; }else{ $status = false; } return $status; }//by bbs.it-home.org

Analysis of programming principle of message in mass station

Php_user_info -------------------- UID Username password User's ID user name password -------------------- Copy Code2. Save the table for the information sent to the user. For example:

PHP to get the Web page source code, page title implementation code

!--? php $lines = file (' H ttp://bbs.it-home.org/'); foreach ($lines as $line _num = + $line) { echo "line {$line _num} :". Htmlspecialchars ($line). " \ n"; } ? copy code 2, get the

PHP implementation of File download, support Chinese file name example code

/*---------------- * $FileName is the file name, must pass * $FilePath is the file path. Optional, can be a relative path or an absolute path * The @ path can only be composed of English and data, not with Chinese * Edit

How to get the array length (number of elements) in PHP

$users = Array ("qdv.cn", "haotu.net", "sharejs.com", "google.com"); Print count ($users)-1; Copy CodeExample 2,php gets the usage of the array's length function count.Example 2,count function to get the length of an array

PHP calculates the specified folder information (number of folders, number of files, folder size)

Format output Directory size unit: BYTES,KB,MB,GB can also be used to count the number of catalogs Site bbs.it-home.org function Getdirectorysize ($path) { $totalsize = 0; $totalcount = 0; $dircount = 0; if

Total Pages: 5208 1 .... 4812 4813 4814 4815 4816 .... 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.