PHP data export to Execel class

Data ?/*Name:toexcelAuthor:riyao Chenversion:0.0.1Date:2006-05-15License:gpl*/ /****************************************This class are to change data from query to Excel fileSQL FORMAT:SELECT c_id,c_title,c_subject from News_content WHERE c_parid=0

PHP Static Paging Basics Tutorial

Basic Tutorials | tutorials | pagination | static Very long articles when preparing to generate static pages, but the content is relatively long, ready to generate static in the form of pagination, how to achieve it? Use PHP for example:$content is

PHP lists all files and folders under the folder you are using

?/************************************Name:listdirAuthor:riyao Chenversion:0.0.1Date:2006-05-16License:gpl This class are to list all file & directory follow a directoryParameter: $strdir, which directory you want list; $del _url,the Manage URL,*****

Anti-Slash in PHP/

Table of Contents Some people like to make up slashes such as $dir = DirName (__file__). '/';And some people too troublesome and code is not beautiful, directly with $dir = DirName (__file__); This can be problematic when we want to include

PHP to determine whether the server port is open code

Record, spare $host = ' www.google.com '; To ping the address, can also be IP $port = ' 80 '; The port to Ping $num = 3; function Microtime_float () { List ($usec, $sec) = Explode ("", Microtime ()); Return ((float) $usec +

PHP Regular filter HTML tags, spaces, line feed code (with instructions)

Copy CodeThe code is as follows: $str =preg_replace ("/\s+/", "", $str); Filter Excess Carriage return $str =preg_replace ("/ $str =preg_replace ("//si", "", $str); Comments $str =preg_replace ("//si "," ", $str); Filtration DOCTYPE $str

PHP page Refresh

Refresh | page refresh1.php New Refresh display: echo " ";Exit Refresh.ihtml When you need two refresh frames, you can write the code two times, except that the function does not have a duplicate name.

When PHP page is accessed, the design of the unified permission verification

Visit | design | page At night someone asked me about the Site page display, the right to judge the problem. So I have this article again. In fact, there are many ways to achieve this.1, you can be in each page alone to judge the right, this is the

PHP Paging function code (simple and practical type)

Prepare data: Create a new database test Execute the following statement (Create a new table Test:id, sex, name three fields) CREATE TABLE ' Test ' ( ' ID ' INT (4) Not NULL auto_increment PRIMARY KEY, ' Sex ' INT (1) Not NULL, ' Name ' VARCHAR '

PHP Unlimited class Lookup parent layer function

Function Such as: ClassID Classfid className ClassCount1 0 China 02 1 Zhejiang 03 1 Jiangsu 04 2 Hangzhou 05 4 West L. District 0 If Findfather (' 4 ', ' 0 ') shows => Hangzhou Findfather (' 4 ', ' 1 ') shows => Zhejiang Findfather (' 4 ', ' 2 ')

PHP Learning material odds and ends things

The verification code is used Strtolower ($str) to lowercase Strtoupper capitalization When you need to send a value to this also, you can use Ajax, and many other methods, var url = "xxx.php"; var data={}; $.post{url, Data,function () { if (

PHP generates Excel documents

Excel| Build Excel ?Header("Content-type:application/vnd.ms-excel" ); Header("Content-disposition:filename=test.xls" );echo "test1\t" ;echo "test2\t\n" ;echo "test1\t" ;echo "test2\t\n" ;echo "test1\t" ;echo "test2\t\n" ;echo

PHP program to accelerate the discovery of server load test

Program | Server server load is too heavy to affect the efficiency of the program is also very common, we need to test this. Here I take the current most common Apache server as an example. The Apache server comes with a tool called AB (Apachebench)

A few ways to improve the efficiency of PHP sequential operation

1, replace i=i+1 with I+=1. It is more efficient to conform to the C + + habit.2. Use PHP internal function as much as possible. Write your own function before you need to consult the manual to see if there are related functions, otherwise thankless.

PHP Simple anti-brush counter

Counter Require_once (' config.php '); function counter () { Session_Start (); $sql = "Select counter from Counter"; $result = @mysql_query ($sql); if (!empty ($result)) { $row =mysql_fetch_array ($result); $counter =++ $row [counter]; if

PHP generates HTML

Generate HTML If you want to generate a separate file for the HTML code generated by the PHP page, you can use the following code.$s _fname = "93e.php";$o _fname = "93e.htm";Ob_end_clean ();Ob_start ();Include ($s _fname);$length = Ob_get_length ();$

PHP downloads a picture in a CSS file

As a senior and professional Skinner personnel, I began to invest in the great Internet from the beginning to now accumulated a wealth of Skinner experience. I'm sure every web programmer will have a similar experience. In the Skinner process, it is

How PHP gets the size of the directory

Roughly is not know how many levels of directory below the directory, also do not know how many files, the need to count the size of space, this can be used in albums/database occupancy/network u disk programs. The general program idea is to use the

Use PHP to read RSS content, to achieve synchronization with the blog

Now, almost every blog has its own RSS aggregation system, for RSS, the following small program, to achieve the synchronization with the blog call. The following are the referenced contents:The file Test.xml contains an XML document

Methods and techniques for using session in PHP

Must be added before use;Session_Start ();?>Consider that we have time to consider whether to write sessionif (Isset ($_post[' userid ')) {If you really agree to write:$_session[' userid ' = $ccdot }else{Or return cannot be written to session}?>

Total Pages: 12780 1 .... 9303 9304 9305 9306 9307 .... 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.