Php

Discover php, include the articles, news, trends, analysis and practical advice about php on alibabacloud.com

PHP character interception and image filtering function

This article free of charge for your friends to provide a PHP character interception and image filter function Oh, if you like to come in and see this picture filter regular expression test function msubstr ($STR, $start, $len) {$tmpstr = "";  $strlen = $start + $len; for ($i = 0; $i < $strlen; $i + +) ...

PHP gets the current URL domain name instance code

PHP tutorial Gets the current URL domain name instance code function getServerName () {$ServerName = Strtolower ($_server[' server_name ']?$_server["Server_   NAME ']:$_server[' http_host ']); if (Strpos $ServerN ...

PHP generates CAPTCHA pictures from getting started and proficient in tutorials

In PHP to generate a CAPTCHA image is quite simple, because in PHP for us to provide a graphics Gd.dll library, to enable the GD graphics library we just php.ini in the PHP-GD front; Method a $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&qu ...

PHP Shell 2.3 release PHP script shell

The PHP shell is a shell that overwrites the PHP script. You can use it to execute arbiritary shell commands, or browse your remote http://www.aliyun.com/zixun/aggregation/17117.html ">web file system on the server." In a way, you can replace a normal Telnet connection that can use PS to manage and maintain your Web site. PHP Shell 2.3 This version ...

php regular expressions matching Chinese characters

Php tutorial Chinese characters match the regular expression Chinese characters match the regular expression: [u4e00-u9fa5] Commentary: Matching Chinese is really a headache, with this expression is easy to match the double-byte characters (including Chinese characters ): [^ X00-xff] Comment: Can be used to calculate the length of the string (a double-byte character length meter 2, ascii character meter 1) * / $ str = "singlepoint single point log"; if (preg_matc ...

The loop statement in PHP is used to execute the same code block specified number of times

loop when you write code, you often need to have the same code block run many times. You can use loop statements in your code to accomplish this task. In PHP, we can use the following loop statement: While as long as the specified condition is set, the circular execution code block Do...while executes the code block first, and then repeats the loop for the execution of the code block specified when the specified condition is set. foreach Loops The block of code based on each element in the array as long as it refers to ...

PHP excludes weekends and Holidays program instance code

PHP tutorial excludes weekend and holiday program instance Code date_default_timezone_set (' PRC '); /** * The date after a certain number of days from a date, * excluding Saturday Sundays and holidays * @param $start start date * @param $offset ...

PHP generated Chinese verification code garbled problem solving

PHP generated Chinese authentication code garbled problem solving//will be processed Chinese characters, first from the UTF8 of Chinese characters into an HTML entity form to reuse. Example code://ini_set (' jis-mapped Japanese Font Support ', false); $pic =imagecreate (250,30); $black =imagecolorallocate ($pic, 0,0,0); $white =imagecoloral ...

PHP cannot upload solution larger than 2M file

General PHP Settings default upload file size is 2M, so if you want to upload files larger than 2 m, you need to reset the PHP configuration file. Open php.ini, first found;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; File uploads;;;;;;;;;;; Area, there are several parameters that affect file uploads: File_uploads = on;

PHP converts HTML to text function

The article provides you with a PHP HTML Convert to text function Oh, if you like it. <?php if (!defined (' Dedeinc ')) {exit ("Request error!");} function Sphtml2text ($str) {$str = Preg_replace ("/<sty" (. */style&g ...

PHP solve input input multiple spaces only show one problem

Here a simple introduction to the PHP solution input multiple spaces to display only one problem, we use the Chr (32) to replace the HTML characters, the need for friends can refer to. The code is as follows <body> <form id= "Form1" Name= "Form1" "method=" Post "action=" "> &nbs ...

PHP options and Information function library: getmypid

Getmypid (PHP3, PHP4) getmypid---&http://www.aliyun.com/zixun/aggregation/37954.html ">nbsp; Gets the processing ID syntax for PHP: int getmypid (void) Description: Returns the current PHP processing (process) ID, and returns FALSE. Reference: Getmyuid () & ...

PHP 5.4 Beta1 Post Hyper-text preprocessing language

phphttp://www.aliyun.com/zixun/aggregation/7434.html > Development Team today proudly announced that the first beta version of PHP 5.4 was finally released. PHP 5.4 includes new language features and deletes several traditional (deprecated) behaviors. Windows executables can be downloaded from Windows QA Web site. This is a development preview version, so please do not use it in the actual application! Added new features and repair ...

php jump function and get the URL address of the current page

php tutorial jump function and get the url address of the current page function url_this () {$ url = "http: //". $ _ server ["http_host"]. $ _ server ["request_uri & qu ...

All pictures and picture addresses in the PHP regular content

PHP tutorials in the regular content of all pictures and pictures address/method A $body = ' <img src= ' image/2009112422220515.gif "alt=" Real Estate network 111cn.net "border=" 0 "/>"; Preg_match_all ("/(SRC|SRC) =[&

PHP ajax XMLHttpRequest Post Instance code

PHP Tutorial Ajax XMLHttpRequest Post Instance code <! DOCTYPE HTML PUBLIC "-//w3c//dtd XHTML 1.1//en" "Http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" > <html xmlns= " Http://www.jzrea ...

PHP Traversal Object Properties Two ways

PHP Tutorial Traversal Object Properties Two methods * * This article we want to provide you with two kinds of traversal object property methods, and illustrate the traversal object properties in PHP application.     * * class Foo {private $a;     public $b = 1;     Public $c; P ...

PHP Common Date phase functions (date plus subtraction and conversion time)

PHP commonly used date function [date plus minus, two date difference, date conversion time Cut] The following code is some commonly used date processing functions, you can add and subtract two times, the difference between two dates, date conversion time cut. echo Date (' y-m-d ', Strtotime (' +1 d ', strtotime (' 2009-07-08 '))//Date days Add function echo Date ("y-m-d", ' 1246982400 '); EC ...

PHP Access count code using cookies

This code is a statistic of the number of accesses that are implemented using cookies. <?php Global $count; $count = 1; if (!isset ($_cookie["Visittime"])) {Setcookie ("Visittime", Date ("y-m-d h:i:s")), Setcookie ("Visitcou ...

PHP 5.3.8 Publish HTML inline language

phphttp://www.aliyun.com/zixun/aggregation/7434.html > Development team announced the upcoming PHP 5.3.8. This release addresses two issues found in the PHP 5.3.7 release: Core: Corrected bug#55439 (crypt () returned only MD5). OpenSSL: Restore timeout to handle changes in PHP 5.3.6 behavior, new behavior resulting in MYSQLND SSL connection ...

Total Pages: 27 1 2 3 4 5 6 .... 27 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.