Linux Yum installs GD library for PHP

[Root@jbxue ~]# Yum Install php-gd* Setting up Install Process Setting up repositories Base 100% |=========================| 951 B 00:00 Update 100% |=========================| 951 B 00:00 ===============================

PHP APC Cache Usage Instance

Defaults (' Admin_username ', ' APC '); Admin Username Defaults (' Admin_password ', ' PASSWORD '); Admin password-change this to ENABLE!!! Copy Code3, APC using the sample APC is very simple to use, see the following several

PHP removes HTML tag function code

function nohtml ($content) { $content = Preg_replace ("/]*>/i", "', $content); $content = Preg_replace ("//i", "', $content); $content = Preg_replace ("/]*>/i", "', $content); $content = Preg_replace ("//i", "', $content);

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");

Example of making PHP image verification code

$authnum = "; $ychar = "0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z"; $list =explode (",", $ychar);//Split function for ($i =0; $i $randnum =rand (0,35); $authnum. = $list

PHP socket uses SMTP to send mail with attachments

eol

/** * PHP socket SMTP Send mail * edit:bbs.it-home.org */ Define ("SOL", "\ n"); Define ("EOL", "\ r \ n"); Define ("Smtp_host", "smtp.163.com");//SMTP server Define ("Smtp_port", "+");//smtp Server port

Destoon the URL Rewrite (pseudo-Static) setting method tutorial

LoadModule Rewrite_module libexec/mod_rewrite.so Addmodule mod_rewrite.c Copy CodeFor Apache 2.x users, check if the following code is present in conf/httpd.conf: LoadModule Rewrite_module

PHP takes the binary file header to determine the file type

/** * PHP takes the binary file header to quickly determine the file type * * @param file $file * @return String * @author Lrenwang * @blog blog.lrenwang.com */ function Get_extname ($file) { $fp =

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); ?

PHP Utf-8 Encoding Solution 10 method

[MySQL] default-character-set=utf8 [ MYSQLD] default-character-set=utf8 default-storage-engine=myisam join under [mysqld]: default-collation=utf8_bin init_connect= ' Set names UTF8 '

PHP kanji transcoding GBK to BIG5 encoding conversion

PHP Kanji transcoding Class qswhbig5{ var $qswhData; function QswhBig5 ($filename = "qswhbig5.php") { $this->qswhdata=file ($filename); } function Qswhstr ($GB, $fail = "??") { /****** (Qiushuiwuhen 2002-9-6) ******

PHP sends a class with an attachment message

/** * Send a message with an attachment * by bbs.it-home.org */ Class Cmailfile { var $subject; var $addr _to; var $text _body; var $text _encoded; var $mime _headers; var $mime _boundary = "--=======

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 functions get online IP and client IP

/** * Get Client IP * @return [string] [description] */ function Getclientip () { $ip = null; if (Isset ($_server[' http_x_forwarded_for ')) { $arr = Explode (', ', $_server[' http_x_forwarded_for '); $pos =

PHP traversal directory with all of its files

function My_scandir ($dir) { $files =array (); if (Is_dir ($dir)) { if ($handle =opendir ($dir)) { while (($file =readdir ($handle))!==false) { if ($file! = '. ' && $file! = "...") { if (Is_dir ($dir. " /". $file))

Understand and learn the PHP framework in all aspects

PHP has become the most popular scripting language for a number of reasons: flexibility, ease of use, and so on. For project development, we usually need a PHP framework instead of the programmer to do the repetitive parts. This article will parse

So you can always win PopCap Bookworm

Bookworm is a very good game, if you don't know it, then you can search in the App Store. I used PHP to write a forever will spell out the highest score vocabulary program, hey, I am good or badFullwordlist.txt is a dictionary, the document is too

How does the PHP array delete element rebuild the index?

$arr = Array (' A ', ' B ', ' C ', ' d '); Unset ($arr [1]); Print_r ($arr); ?> Copy CodePrint_r ($arr), the result is not that, the end result is an Array ([0] = a [2] = c [3] + D)How do I let the missing elements be

Start and end IP addresses for a network segment

Start and end IP addresses for a network segmentFor example: Network segment (192168.1.5/24), whose subnet mask is divided according to 24:11111111.11111111.11111111.00000000 (255.255.255.0)Description: The IP address is 32bits,24 in the division of

PHP recursive functions recursively copy and delete directories of those things

In PHP programming, the replication and deletion of multi-level directories is a problem, you can use the PHP recursive function to implement the directory copy and delete operations, custom recursive function copy directory and delete some examples

Total Pages: 5208 1 .... 1532 1533 1534 1535 1536 .... 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.