PHP File Download class

Copy codeThe Code is as follows: // ================================================ ====================// Example:// $ Download = new download ('php, exe, html', false );// If (! $ Download-> downloadfile ($ filename ))//{// Echo $ download->

Apache + php4 + mysql in WINXP

In WINXP, APACHE2.052-win32 + php4.39-win32 + mysql4.022 is configured throughApache, php4, and mysql can be accessed online,I just wrote my own experiences for you to share.(1) apache configuration1. Install APACHE_2.0.52-win32, the default

Install pear in windows xp

Install pear in windows xpEnvironment: PHP4.3.10 + Windows XPInstallation steps:1) work before installationThere is a go-pear.bat file under the folder generated after installing PHP(My is C:/PHP/go-pear.bat)2) execute the installerDouble-click the

When character_set_client = binary is set in the mysql character set, the table description is garbled in the case of gbk.

After the mysql connection is established, set the encoding as follows:Copy codeThe Code is as follows:Mysql_query ("SET character_set_connection = ". $ GLOBALS ['charset']. ", character_set_results = ". $ GLOBALS ['charset']. ",

One MYSQL operation class

Copy codeThe Code is as follows:Class DB {Var $ host_addr = "localhost ";Var $ host_user = "root ";Var $ host_psw = "123 ";Var $ db_name = "test ";Var $ link_id;Var $ query_id;Var $ numRow;Function DB (){$ This-> link_id = @ mysql_connect ($ this->

PHP beginners (13th)

PHP Resources12. PHP ResourcesYou can learn more about php3. Many email lists and books are very useful to you.12.1 siteThe explosive popularity of PHP has prompted many PHP-based sites overnight, many of which include online tutorials, sample code,

Php obtains the user's IPv4 or IPv6 address code

In fact, this is very simple, but I have always wanted to use the ipv6-test API to get a user IP address ...... But what JSON gets is the IP address of the local server. Forget it, don't study it, And the widgets provided by others are also quite

Php generates WAP page

WAP (Wireless Communication Protocol) is an open global standard for communications between digital mobile phones, personal handheld devices (PDAs), and computers. Static WAP pages cannot meet personalized service requests in many aspects. Therefore,

How to export xls in Simple Excel

I wrote an article a few days ago and used the php-excel-reader class to import the excel content. By the way, I used simple excel to export some excel files. This is a simple export xls class, very useful!Simple excel source code is as follows:Copy

The color of excel exported by phpexcel is inconsistent with that displayed on the webpage.

For some questions about how to export the color of phpexcel, how does the color of the excel exported using phpexcel differ from the color displayed on the webpage? Want to know what is going on? How can this problem be solved? The PHP code details

PHP to obtain the http request header information

The PHP Manual provides ready-made functions:Getallheaders(PHP 4, PHP 5)Getallheaders-Fetch all HTTP request headersDescriptionArray getallheaders (void)Fetches all HTTP headers from the current request.This function is an alias for

PHP Study Notes install and configure the php environment under IIS7

How to install PhpPhp version Selection Php in windows (php5.4.7) has two versions:VC9 x86 Non Thread Safe Non-Thread security model run in FastCGI ModeVC9 x86 Thread Safe Thread security runs in ISAPI ModeInstallation ProcessYou only need to

Php code used to calculate the program running time

Copy codeThe Code is as follows:Class Timer {Private $ StartTime = 0; // the start time of the program.Private $ StopTime = 0; // end time of the program runningPrivate $ TimeSpent = 0; // time spent on running the programFunction start () {// start

PHP basic traps (variable assignment)

Copy codeThe Code is as follows:$ A = 3;$ B = 6;If ($ a = 5 | $ B = 7 ){$ A ++;$ B ++;}Var_dump ($ a, $ B ); Trap 1Consider $ a = 5 and $ B = 7 as $ a = 5 and $ B = 7.Error result: 3, 6Trap 2Operator priority. $ a = 5 is assigned successfully. $ B =

A simple method makes background logon more secure (adding session verification in php)

This document uses Joomla! The background link is used as an example to explain how to "modify" our background link to make it more secure.Principle: Use a specific file to register a session for the background portal. Otherwise, the session fails

Without JS, php fully implements code for process-oriented data paging.

Copy codeThe Code is as follows:// The session set on the login page. When the session contains the name// Session_start ();// $ Name = $ _ SESSION ['name'];// If (empty ($ name )){// Header ("Location: error. php ");// Exit ();//}//

Careful use of PHP reference Cause Analysis

Reference is used in many computer languages and is a very powerful and practical feature. It has the implementation similar to the Pointer, but it has a different performance from the Pointer. For example, the reference of C ++ allows different

Array of common PHP development function parsing [unfinished]

I. array processing functions:Intoxicating: array processing functions are very common in PHP development. Learning array processing functions is crucial. array Processing functions involve the creation of arrays, the conversion of strings from

Summary of various methods of PHP Cache Technology

1. General Cache Technology: Data Cache: The data cache here refers to the PHP cache mechanism for database queries. Each time you access the page, it first checks whether the cache data exists. If it does not exist, it connects to the database,

Php computing 12 constellation Function Code

Core code:Copy codeThe Code is as follows:/** Calculate the constellation function string get_zodiac_sign (string month, string day)* Input: Month, date* Output: constellation name or error message*/Function get_zodiac_sign ($ month, $ day){// Check

Total Pages: 12780 1 .... 4398 4399 4400 4401 4402 .... 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.