Two open-source PHP output Excel files

1. php-Excel Php-Excel is a very simple library for generating Excel documents from PhP on-the-fly. Http://code.google.com/p/php-excel/Download scriptsHttp://www.jb51.net/codes/24319.html2. phpexcel Project providing a set of classes for the PHP

Frename PHP flexible File naming function frename

To solve this problem, some methods are to rename the new file with a timestamp, and some are to increment the serial number. To solve the problem, I recently compiled a frename function, you can use custom rules to obtain the new names of uploaded

Php zip file decompression class code

CopyCode The Code is as follows: Class zip { VaR $ datasec, $ ctrl_dir = array (); VaR $ eof_ctrl_dir = "\ x50 \ x4b \ x05 \ x06 \ x00 \ x00 \ x00 \ x00 "; VaR $ old_offset = 0; var $ dirs = array ("."); Function get_list ($ zip_name) { $ Zip = @

PHP static variable Initialization

For example: Class { Public $ F1 = 'xxxx '; Static public $ f2= 100; } If you want to assign a variable to an object, you can only initialize the variable in the constructor. For example:Class {Private $ child;Public Function _ construct (){$

PHP 8-hour time difference solution Summary

The date. timezone option has been added to PhP. ini since php5.1.0. It is disabled by default. That is, the displayed time (no matter what php Command is used) is the Greenwich Mean Time. The difference between the time and our time (Beijing

PHP regular unknown modifier error Solution

The following regular expressions: $ A = '2 tóng D ò ng average 3 ';Echo preg_replace ('/ [^ /', '', $ ); Will prompt: Warning: preg_replace (): Unknown modifier 'p' in E: \ phplearn \ test. php on line 12

PHP simple_html_dom.php + Regular Expression COLLECTION Article code

CopyCode The Code is as follows: // Contains the PHP simple HTML Dom class library file Include_once ('./simplehtmldom/simple_html_dom.php '); // Collect htmlFunction getwebcontent ($ URL ){$ CH = curl_init ();$ Timeout = 10;Curl_setopt ($ ch,

Poor PHP code simplification

CopyCode The Code is as follows: Echo (" search results for query :"). $ _ Get ['query']. ". "; ?> The main problem with this Code is that it directly displays the data submitted by the user on the webpage, resulting in an XSS vulnerability. There

PHP memcached + APC + File Cache encapsulation implementation code

Usage: Memcached CopyCode The Code is as follows: $ cache = new cache_memcache (); $ Cache-> addserver ('www1 '); $ Cache-> addserver ('www2 ', expires 11,20); // This server has double the memory, and gets double the weight $ Cache-> addserver

PHP cache source code from phpguru

You don't need to know the role of cache. I have interviewed some people over the past few days and found that many people have used too many frameworks and have forgotten the basics. When you ask something, he always says that the framework has

Php ip address-Based Access Control Code

Assume that the IP address range is 192.168.0.0 ~ 192.168.0.255, only allow access from this IP segment Code As follows: Copy code The Code is as follows: $ IP = $ _ server ['remote _ ADDR ']; $ From = strcmp ($ IP, '192. 168.0.0 '); $ To = strcmp

PHP retrieves the value of the select drop-down list box

Give the select form a unique name. After the form is submitted, use $ _ post or $ _ get to submit the form. $ _ Post ['sel '] or $ _ Get ['sel'] to obtain the value of the selected SELECT statement. CopyCode The Code is as follows: if ($ _ post){

PHP date () Date and Time Functions

1, year-month-day Echo date ('Y-m-J '); 2007-02-6 Echo date ('Y-n-J ');07-2-6 Uppercase y indicates four digits of the year, while lowercase y indicates two digits of the year;Lowercase M indicates the number of the month (with the leading

PHP Regular Expression basic function modifier metacharacters and escape characters

I used a lot of regular expressions in the thieves, so I will gradually reduce the regular expressions in the next version. The characters to be escaped in PHP regular expressions are as follows: $ ^ * () + = {} [] |/: <> .? '" Note:

Summary of common PHP anti-leech protection methods

1. Simple anti-leech CopyCode Code: $ admin [defaulturl] = "http://jb51.net/404.htm"; // address returned by leeching $ Okaysites = array ("http://jb51.net/", "http://www.jb51.net"); // White List $ Admin [url_1] = "http://jb51.net/temp/download/";

Generate PHP code for Ubuntu auto-switch wallpaper XML file

CopyCode The Code is as follows: /* * Generate xml file for Ubuntu automatic switch Wallpaper */ // Image directory $ Dir = '/home/Yuxing/background '; $ Hd = opendir ($ DIR) or die ('can not open dir ');$ Files = array ();While ($ file =

Brief description of PHP garbage collection mechanism

Although I am also a PHP learner, I didn't know much about the garbage collection process in PHP before, but I used unset, null, mysql_close in our code, __destruct and other functions to release objects to prevent memory overflow. Therefore, go to

Php radio implementation code for getting and holding a single record value

Php read single-choice button radio Value Copy codeThe Code is as follows: radio value of the php read single-choice button Single choice 1 Single choice 2 If ($ _ POST) { Echo 'select a single select', $ _ POST

How does php process millions of databases and increase query processing speed?

1. To optimize the query, try to avoid full table scanning. First, consider creating an index on the columns involved in where and order. 2. Try to avoid null value determination on the field in the where clause. Otherwise, the engine will discard

22 PHP open-source frameworks

So what makes PHP so popular? PHP is so popular because it is easier to learn than other languages. There are a lot of pretty good PHP tutorials on the Internet that allow you to quickly develop Web programs. Although PHP is simple and easy to use,

Total Pages: 12780 1 .... 3438 3439 3440 3441 3442 .... 12780 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.