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

How to initialize an array in PHP

Array There are generally 2 ways to initialize an array: One is to assign values to the elements in the array, and one is to initialize all the elements together.The following is a brief description of 2 ways to initialize an array:The first method:$

PHP Paging function

Page Pagination | functions ? Paging function Function Genpage (& $sql, $page _size=20) { Global $prepage, $nextpage, $pages, $sums; Out param $page = $_get["page"]>=1?$_get["page"]:1; $eachpage = $page _size; $pagesql = Strstr ($sql,

PHP under the site to prevent IP attack code, Super practical

Today, I developed the following code, which is the first in a day to intercept 15 IP, the server load is normal. Copy CodeThe code is as follows: Query prohibits IP $ip =$_server[' remote_addr ']; $fileht = ". Htaccess2"; if (!file_exists ($fileht)

PHP Implementation Lookup Table

"Basic Algorithm" Suppose you have an array, you need to find out where the value is in the array. ?Two-point Searchfunction Bin_sch ($array, $low, $high, $k) {if ($low $mid = Intval (($low + $high)/2);if ($array [$mid] = = $k) {return $mid;}elseif (

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 basic configuration: PHP's most commonly used INI function

PHP's configuration function is a few ini_* functions, mainly for the operation of the configuration file, in fact, four functions: Ini_get, Ini_set, Ini_get_all, Ini_restore. The most useful thing about personal feeling is ini_set and ini_get. *

PHP to make Google sitemaps--php article base

Google|sitemap put the following code as a php file, upload the site root directory, run once, and get the URLs under the root directory.txt that can be used as your site's sitemaps submitted to google!Note: Change the URL in the code to your home

Graphics class->gd.class.php

Graphics Class gd{/*Function description$data: Y-axis data (array)$graphdata: Y-axis data--percent (array)$label: X-axis data (array)$height: Image Height$width: Image width$font: Font Size$dot: Determining the size of a point$BG: Background color$

PHP Anti-injection

Anti-injection/************************* Description Determines whether the passed variable contains illegal characters such as $_post, $_get Function: Anti-injection **************************/ Illegal characters to filter$ArrFiltrate =array ("'", "

Php. MVC template tagging System (ii)

The Php.mvc Tag Action Dispatcher Tagactiondispatcher is the implementation of a standard Actiondispatcher class that supports access to basic template tags. The Tagactiondispatcher class supports the same Actionobjects collection and

Three ways to read database information directly from PHP

The function of this code is to connect to a MySQL server with a URL address of localhost and a port of 3306. The function of this piece of code is: Connect to a MySQL server with a URL address of localhost and port 3306. The MySQL server account

PHP Invoke TinyURL API Source Example

TinyURL is a shortened web site service, you can turn a long web site into a simple address, usually the way to create TinyURL is to its homepage to create, sometimes there will be users in the client automatically generate TinyURL situation

Three ways to delete a directory using a PHP program

1. Recursive method://No Test The following are the referenced contents:Deletedir ($dir){if (RmDir ($dir) ==false && is_dir ($dir)) {if ($DP = Opendir ($dir)) {while (($file =readdir ($DP))!= false) {if (Is_dir ($file) && $file!= '. ' &&

PHP Source Learning: Probe Httpheader head

Program:spr2[detect_httpheader]Author:uchinaboyE-mail:uchinaboy@163.comqq:16863798date:2001-7-25****************************************************/$host = "www.infojet.com.cn";$port = "80"; $path = "/yuhu/";$filename = "talk0.asp";$datestream =

FTP Learning in PHP (iii)

by Vikram Vaswani Melonfire November 07, 2000 Now, we have contacted PHP about FTP a large number of functions, but this is just a function, far from our goal is not enough, to show the true power of these functions, we should establish a program,

FTP Learning in PHP (ii)

by Vikram Vaswani Melonfire November 07, 2000 Logged on to the FTP server, PHP provides functions that can get information about systems and files and directories. Ftp_pwd () If you want to know your current directory, you need to use this function.

PHP development tool-prado 1.6 advanced Topics

Ado| Advanced 4th Chapter Advanced Topics 4.1 Maintenance of display status The display state of a component refers to the data that the component should always hold in a series of postback. For example, when a user changes the font color of a

Creating a template framework for static web sites with PHP (iv)

Template framework for static web sites First, we write template files for all the common elements of the page as well as the overall layout of the page, and then remove the public parts from all the pages, leaving only the content of the page,

Example to explain the buffering and compressing of PHP dynamic content

Dynamic | compression PHP4 uses a buffer mechanism , before you decide to send , All content just exists in the buffer , Instead of sending it directly to the browser , Although you can use header and Setcookie functions to achieve , but these two

Total Pages: 12780 1 .... 2475 2476 2477 2478 2479 .... 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.