Using the Phpexcel Library

Please introduce Phpexcel library before use /** * Excel write, based on Phpexcel library * @param array $data * @param $file * @return BOOL * @throws phpexcel_exception * */ function Excel_insert

PHP Image Upload Method

Public Function LBT () { $ajax = Input::get (' ajax ', '); if ($ajax = = ' 1 ') { if (!empty ($_files)) { $fileDir = Public_path (). ' /test/'; $newFile = $fileDir. $_files["MyFile" ["Name"]; $info = PathInfo ($newFile);

PHP Curl gets data via proxy

$curl =curl_init (); curl_setopt ($curl, Curlopt_url, "http://www.baidu.com/"); curl_setopt ($curl, Curlopt_useragent, ' mozilla/5.0 (X11; Ubuntu; Linux i686; rv:20.0) gecko/20100101 firefox/20.0 '); curl_setopt ($curl,

PHP Judge Access IP

Determine Access IPPHP code function GetIP () { if (! empty ($_server ["http_client_ip"])) { $CIP = $_server ["Http_client_ip"]; } else if (! empty ($_server ["http_x_forwarded_for"])) { $CIP = $_server

A simple, pure PHP page-out class

His characteristics: simple, accept the parameters, give the paging; flexible: You can decide, the name of the next page (for example, I want to call Prev, NEX T and so on) can determine the number of pages displayed per page, across pages to

HTTP request processing class for PHP

[PHP] Code /** * HTTP request processing class (encapsulated based on Curl) * * @author Xiwei Ye * @version $Id $ */ Class Cls_http_request { /** * Get mode request (Curl) *

PHP A simple quick sort

Fast sorting with constant positioning of datum numbers /** * Created by Phpstorm. * User:saint * DATE:15/8/5 * Time: 11:49 */ Class Demo { Public $a = Array (3, 6, 9, 2, 4, 7, 1, 5, 8, 0);

PHP Compressed CSS File

Compress multiple CSS files at once Header (' content-type:text/css '); Ob_start ("compress"); function Compress ($buffer) { /* Remove Comments */ $buffer = Preg_replace ('!/\*[^*]*\*+ ([^/][^*]*\*+) */! ', ' ',

PHP Gets the day of the week or a date

Effect: Today is: Friday today is: Friday 2010-12-12 Yes: Sundays [PHP] Code function Getweekname ($data, $format = ' Week ') { $week = Date ("D", $data); Switch ($week) { Case "Mon": $current =

Phpexcel Data Export Instance

First, getdata.php namespace Webadmin\model; Use Extendspace\excel; ...... Slightly ...... Remove data $DATABILLARR = $this->get_list_bysql ($sql); 0, 1 in the replacement data

PHP Sensitive word Filter Code

$f = File (' Words.txt '); $words = Array (); foreach ($f as $w) { $words [] = Preg_quote (Trim ($w), '/'); } $text = file_get_contents (' text.txt '); $start = Microtime (true); $reg = '/'. Implode ('

PHP lists all the databases in MySQL

Define (' NL ', ' \ n '); Define (' TB ', '); Connecting to MySQL. $conn = @mysql_connect (' localhost ', ' username ', ' password ') Or Die (Mysql_errno (). ': '. Mysql_error (). NL); Attempt to get a list of MySQL

PHP-Implemented Web Proxy

if (!isset ($_request["url"])) exit; $u = $_request["url"]; if (substr ($u, 0, 7)! = "/http") exit; Echo file_get_contents ($u); /* function GetPage ($url, $referer, $timeout, $header =true) { if

PHP Cryptographic decryption Processing class

Class Syscrypt { Private $crypt _key; constructor function Public function __construct ($crypt _key) { $this-Crypt_key = $crypt _key; } Public Function Php_encrypt ($txt) { Srand (Double)

PHP Generates letter prefixes

[PHP] Code function Ff_letter_first ($s 0) { $firstchar _ord=ord (Strtoupper ($s 0{0})); if ($firstchar _ord>=65 and $firstchar _ord=48 and $firstchar _ord $s =iconv ("UTF-8", "gb2312", $s 0); $asc =ord ($s {0})

PHP gets all the links in the specified URL page

Gets all the links in the specified URL page function Get_url_href ($url) { $html = file_get_contents ($url); $dom = new DOMDocument (); @ $dom->loadhtml ($html); $xpath = new Domxpath ($dom); $hrefs =

To determine if a user is using a proxy's PHP code

/***************************************************** * * IsProxy * Check whether client is under Proxy or not * $_server[' http_x_forwarded_for '] is pivotal here * If client is under Proxy, returns True * If

PHP voting applet, anti-timeout, anti-IP restrictions

Welcome to visit back.zhizhi123.com Reference Blog http://back.zhizhi123.com/?p=126 Set_time_limit (0);//Prevent timeouts function Toupiao ($i) { $proxy = Array (' 182.48.116.51:8080 ', ' 110.177.63.191:9999

PHP Gets the time stamp function for the start of the first day of the specified month and the end of the last day

/** * Gets the timestamp of the start of the first day of the specified month and the end of the last day * * @param int $y year $m month * @return Array (start of month, end of month) */ function

PHP implementation of fast sorting algorithm

!--? php function quicksort ($seq) { if (count ($seq) > 1) { $k = $seq [0]; $x = Array (); $y = Array (); for ($i =1; $i

Total Pages: 5208 1 .... 4771 4772 4773 4774 4775 .... 5208 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.