PHP Force download file code (to solve the problem of Chinese file name garbled under IE)

$file _name = urlencode ($_request[' filename '); Header ("Pragma:public"); Header ("expires:0"); Header ("Cache-control:must-revalidate, Post-check=0, pre-check=0"); Header ("Content-type:application/force-download");

Modify PHP Upload file size limit (Windows, Linux)

Introduced under the revised PHP upload file size limit method, sub-Windows and Linux two environments, respectively, introduced the next PHP upload limit solution, the need for a friend reference.This section: Modify the PHP upload file size limit,

PHP export Excel PHP using Phpexcel export Excel file

Load Phpexcel class Require './phpexcel/phpexcel.php '; Create an instance of an Excel object $objPHPExcel = new Phpexcel (); Set document basic Properties $objProps = $objPHPExcel->getproperties ();

PHP jquery Multi-File upload implementation code

Upload Copy Code2,php multiple File Upload code upload.php If directory doesnot exists create it. $output _dir = ". /upload "; if (Isset ($_files["myfile")) {

Good PHP face questions and Answers

Strrev ($STR) { $len =strlen ($STR); $newstr = "; for ($i = $len; $i >=0; $i--) { $newstr. = $str {$i}; } return $newstr; } Copy Code15. The implementation of the text

Useful PHP Header Download function

/** * Send File * * @param string $fileName file name or path * @param string $fancyName A custom file name, or null to use filename * @param boolean $forceDownload whether to force download * @param integer $speedLimit

PHP Chinese Character coding conversion method explaining

This paper introduces some knowledge of Chinese character coding conversion in PHP, analyzes the principle and method of PHP code conversion, and has the need of a friend reference.For an understanding of the mysql4.1 character set, tell how PHP

PHP number combination and split example

$array 1 = Array ("A", "B", "C", "D"); $array 2 = Array ("1", "2", "3", "4"); $array 3 = Array ("!", "@", "#", "$"); $arrayX = Array_merge ($array 1, $array 2, $array 3); Merge 3 arrays together Print_r ($arrayX); ?

Curl wrapper class Curl.class.php and calling method

Curl Class Class Curl { function Curl () { return true; } function Execute ($method, $url, $fields = ', $userAgent = ', $httpHeaders = ', $username = ', $password = ') { $ch = Curl::create (); if (false =

PHP Recursive sample PHP recursive function code

Get the role ID string recursively function Exploderole ($ROLEOBJ, & $resultStr) { if (0 childroleobjarr)) { foreach ($roleObj->childroleobjarr as $CHILDROLEOBJ) { if (' = = ' $resultStr) { $resultStr. = "{$childRoleObj->id}"

PHP imports large amounts of data to MySQL (sample)

Fast MySQL Big Data backup Before using, first modify the SQL file name, database hostname, database user name, password, database name to import by following the code comments. Both the database file and the text are FTP-guided through

Three ways to import SQL files into PHP

$db = mysql_connect (...); mysql_select_db (...); $fp = fopen (' Somefile.sql ', ' R '); while ($fp! = feof ()) { $line = Fread ($fp, 2048); $line = mysql_real_escape_string ($db, $line); mysql_query ($line);

PHP function System|exec|passthru Usage

System ("/usr/local/bin/webalizer/webalizer"); Copy CodeEXEC () Prototype: string exec (String command [, string array [, int return_var]]) the EXEC () function is similar to System (), executes the given command but does not output the

PHP Senior Engineer Face Questions Daquan

This article introduced a PHP Senior engineer interview problem, before the programmer's Home (bbs.it-home.org) introduced a lot of PHP interview questions, here to provide a PHP senior engineer's face test, a bit difficult, need to refer to the

htaccess file to set password protection for the site folder

AuthType Basic AuthName "Restricted area" authuserfile/full/path/to/passwordprotected/.htpasswd Require Valid-user Copy CodeThe first line of AuthType refers to the use of the authentication method, where we

PHP download get remote picture function (can forge route)

Download get remote Pictures function Downimagekeep ($gurl, $rfurl, $filename, $gcookie = "", $JumpCount =0, $maxtime =30) { $urlinfos = GetHostInfo ($gurl); $ghost = Trim ($urlinfos [' Host ']); if ($ghost = = ") {

PHP form submission special character filtering method

This article introduces the way to filter special characters when PHP forms submit data, learn how PHP filters special characters, what character filtering functions, Refer to a friend who needs it. The PHP form submits special character processing

PHP smarty Template engine Practical tips

{Capture name= "test"} {/capture} {$smarty. Capture.test} Copy CodeDescription: The contents of {Capture Name= "test"} and {/capture} are stored in the variable $test, which is specified by the Name

PHP Define Constants Detailed

Class A { Public Function __tostring () { return ' bar '; } } $a = new A (); Define (' foo ', $a); echo foo; Output bar Copy CodeHow the Define in PHP is implemented:

PHP Custom Function Intercept Chinese character length example

function Msubstr ($str, $start, $len) { $strlen = $start + $len; for ($i =0; $i if (Ord (substr ($str, $i, 1)) >0xa0) { $tmpstr. =substr ($str, $i, 2); $i + +; } else $tmpstr. =substr ($str, $i, 1);

Total Pages: 5208 1 .... 1383 1384 1385 1386 1387 .... 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.