Hide Nginx and PHP version numbers in Linux

Nginx Hide Version Number: 1, enter the Nginx configuration file directory (this directory according to the installation decision), with the nano edit open Nano nginx.conf Add Server_tokens off in HTTP {-}; Such as: HTTP {...... OmittedSendfile

Linux executes commands under root for PHP

Recently because of a PHP interface, but because of permissions problems, can not execute some specific commands, because PHP to run nobody. Online search for some solutions, one is the use of the Su method, a C program to achieve, there is a super

Verify that the Zhong Wenjing expression php and JavaScript

JavaScript form validation is Chinese, determines whether an input is Chinese and is implemented through regular expressions.Check to see if it is Chinese function Ischn (str) { var reg =/^[u4e00-u9fa5]+$/; if (!reg.test (str)) { return false;

HTML Transform PHP code

HTML Conversion PHP Tutorial code function htmlphp () {var input = Document.htphp.input.value;Output = "echo" ";for (var c = 0; c if ((Input.charat (c) = = "N" | | Input.charat (c) = = "R")) {Output = "" ";if (c!= input.length-1) output = "n". "";C

PHP touch () function example tutorial

PHP touch () function example tutorialDefinition and usageThe touch () function sets the specified file for access and modification time.This function returns TRUE success, or FALSE failure.SyntaxTouch (filename, time,

PHP unlink () instance tutorial

PHP unlink () instance tutorialDefinition and usageDelete an object in the unlink () function.This function returns TRUE success, or FALSE failure.SyntaxUnlink (filename, context)Check an instance.Basic syntax. Parameter descriptionFile requirements.

PHP array_merge_recursive and array_merge () functions

PHP array_merge_recursive data merging function and array_merge () function usage and example tutorialArray_merge_recursiveDefinition and usageThe array_merge_recursive () function combines multiple arrays of one mine into one array. The difference

PHP array_intersect_key () function example tutorial

Let's take a look at PHP today.Array_intersect_key ()For the function instance tutorial, let's take a look at its simple description, and then look at the tutorial.Array_intersect_key ()Definition and usageThe array_intersect_key () function

Php array usage

Array ([0] => Array ([userid] => 1 [username] => Liu Zhenpeng [status] => 0 [userpwd] =>) [1] => Array ([userid] => 2 [username] => Liu Pengfei [status] => 0 [userpwd] =>) [2] => Array ([userid] => 3 [username] => Liu Peng [status] => 0 [userpwd] =>)

Common php functions

File read function// File read functionFunction PHP_Read ($ file_name ){$ Fd = fopen ($ file_name, r );While ($ bufline = fgets ($ fd, 4096 )){$ Buf. = $ bufline;    }Fclose ($ fd );Return $ buf;    }?>File writing function // File writing

Socket_Read in PHP

Error_reporting (E_ALL );Set_time_limit (0 );$ Runtimes = 100;For ($ I = 0; $ I {$ Str = f_socket ("www.baidu.com", "/s? Wd = 10000 ". $ I );Echo "". $ str. " ";}Function f_socket ($ website, $ url){$ Service_port = getservbyname ('WWW ', 'tcp ');$

After the PHP function is disabled: tempnam ()

After the PHP function tempnam () is disabled, tempnam () can create a temporary file, and the file name will not be overwritten with the file in the same directory.The returned string is the temporary file name. If an error occurs, an empty string

CentOS 6.5 system compilation and installation PHP extended imagick tutorial

About imagickImagick, which can be used by PHP to call the PHP extension of the ImageMagick function. With this extension, PHP can have the same functions as ImageMagick. You can use the APIs provided by ImageMagick to create and modify images.

The entire process of installing and configuring php in CentOS6

Php dependency  Yum install-y libxml2-devel openssl-devel libcurl-devel libjpeg-devel libpng-devel libicu-devel openldap-devel Download: php-5.5.23.tar.gz. /Configure -- prefix =/root/tools/php5.5 -- with-config-file-path =/root/tools/php5.5/etc --

Php multi-dimensional array sorting method

The code is as follows:Copy code // Sort multiple arrays$ Ar1 = array ("ten", 100,100, "");$ Ar2 = array (1, 3, "2", 1 );Array_multisort ($ ar1, $ ar2 );Var_dump ($ ar1 );Var_dump ($ ar2 );// In this example, after sorting, the first array will

Php to determine HTTP_REFERER

*/ The code is as follows:Copy code $ Ref = isset ($ _ server ['http _ referer'])? $ _ Server ['http _ referer']: '';Echo $ ref;If (strpos ($ ref, '192. 168.0.119 ')! = False){Echo 'The road is correct! ';}Else{Echo 'wrong path ';}?> determine

Php multi-file Upload

The code is as follows:Copy code php file Upload Foreach ($ _ files as $ f){// Process the Chinese nameIf (function_exists ("iconv") $ f [name] = iconv ("UTF-8", "gb2312", $ f [name]);$ Unm = intval (mt_rand (1000,9999 ));$ File = "z_upload/".

Php url regular expression test

The code is as follows:Copy code Function funcurl ($ str) // url regular expression test {Return (preg_match ("/^ http: // [A-Za-z0-9] +. [A-Za-z0-9] + [/=? % -&_~ '@ []': +!] * ([^ <> ""]) * $/", $ Str ))? True: false; } 

Php entry-level user logon code

## Table structure 'admin'# The code is as follows:Copy code Create table 'admin '('Id' mediumint (4) not null auto_increment,'Us' varchar (50) not null default '','Pa' varchar (250) not null default '',Unique key 'id' ('id ')) Type = myisam

Php simple registration code

The code is as follows:Copy code user registration last name: Password: Confirm password: email: Telephone: address: The code is as follows:Copy code // Initialize the sessionSession_start ();// Contains the database tutorial

Total Pages: 12780 1 .... 9408 9409 9410 9411 9412 .... 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.