Use the PHPExcel Library

Use the PHPExcel Library Introduce the PHPExcel library before use /** * Excel writing, based on the PHPExcel Library * @ Param array $ data * @ Param $ file * @ Return bool * @ Throws PHPExcel_Exception

Comprehensive database operations for PHP

Comprehensive database operations for PHP Class database { Private $ hostname; Private $ user; Private $ pass; Private $ dbname; Private $ linkflag; Private $ charset;

A php class for conversion from the Gregorian calendar to the lunar calendar

A php class for conversion from the Gregorian calendar to the lunar calendar // A class for converting the solar calendar to the lunar calendar in PHP Class Calendar { # Number of days of the lunar calendar

Php AES encryption and decryption

Php AES encryption and decryption Php code, php provides many good things and uses functions directly. However, php currently only knows the ZeroPadding mode, so other languages can only follow it: $ PrivateKey = "123456781

PHP lists all databases in MySQL

PHP lists all databases in MySQL Define ('nl ', "\ n "); Define ('TB ',''); // Connecting to MySQL. $ Conn = @ mysql_connect ('localhost', 'username', 'password ') Or die (mysql_errno (). ':'.

Web proxy implemented by PHP

Web proxy implemented by PHP If (! Isset ($ _ REQUEST ["url"]) exit; $ U = $ _ REQUEST ["url"]; If (substr ($ u,-0, 7 )! = "Http: //") exit; Echo file_get_contents ($ u ); /*

PHP mandatory file download

PHP mandatory file download If you need to download a specific file without opening a new window, the following code snippets can help you. Function force_download ($ file) { $ Dir = "../log/exports /"; If (isset ($

PHP prevents multiple IP addresses from accessing your website

PHP prevents multiple IP addresses from accessing your website This code snippet allows you to prohibit certain IP addresses from accessing your website. If (! File_exists('blocked_ips.txt ')){ $ Deny_ips = array ( '2017

Nobackend is used in website architecture

Nobackend is used in website architecture Nobackend is used in website architectureThe current application development model places too much emphasis on backend construction. In fact, we have already done many years of work to simplify

PHP randomly retrieves several different numbers from an array.

This article explains in detail how PHP randomly retrieves several different numbers from an array. PHP randomly retrieves several different numbers from an array. The first algorithm, other people's ideas on CSDN $ Num = 0; $ array = array (1, 2, 3

Php script for uploading files through ftp

Php script for uploading files through ftp The general principle is to traverse all non-exclusive files in the project and then obtainThe file modification time is later than the last modification time of the file.And then upload these

Search Chinese characters or English letters by the first letter in PHP

Search Chinese characters or English letters by the first letter in PHP /** * */ Function getfirstchar ($ s0 ){ If ($ s0 [0] = 'I' | $ s [0] = 'I '){ Return "I "; } Elseif ($ s0 [0] = 'U' | $ s [0] =

Obtain the PHP code of the user's IP address

Obtain the PHP code of the user's IP address Function getRealIpAddr () { If (! Empty ($ _ SERVER ['http _ CLIENT_IP ']) // check ip from share internet { $ Ip = $ _ SERVER ['http _ CLIENT_IP '

Basic operations on php files

Basic operations on php files // Basic file operations // Fopen () Open a file // Open a file in the absolute path, select read-only mode, and return the resource $ handle $ Handle = fopen

Php binary search algorithm

Php binary search algorithm // $ Low and $ high have to be integers Function BinarySearch ($ array, $ key, $ low, $ high) { If ($ low> $ high) // termination case { Return-1; } $

PHP code snippet used to determine the dominant color of an image

PHP code snippet used to determine the dominant color of an image This code helps you determine the dominant color of any image and use a simple statistical algorithm. $ I = imagecreatefromjpeg ("image.jpg "); For ($

Php calculates the distance between two coordinates (longitude and latitude)

Php calculates the distance between two coordinates (longitude and latitude) Php calculates the distance between two coordinates (longitude and latitude). The Returned result is meter or kilometer. Function distance ($ lat1, $

Php redies encapsulation class-php Tutorial

Php redies encapsulation class /** * Redis Operations Support Master/Slave load clusters * * @ Author jackluo */ Class RedisCluster { // Whether to use the M/S read/write Cluster

Php uses socketpost to send data to other webservers

Php uses socketpost to send data to other webservers Function post_request ($ url, $ data, $ referer = ''){ // Convert the data array into URL Parameters like a = B & foo = bar etc. $ Data = http_build_query ($

Php symmetric encryption algorithm (DES/AES) code

Php symmetric encryption algorithm (DESAES) code /** * Common symmetric encryption algorithms * Supported keys: 64/128/256 bit (byte length: 8/16/32) * Supported algorithms: DES/AES (auto match based on key length:

Total Pages: 12780 1 .... 8631 8632 8633 8634 8635 .... 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.