_php techniques for handling strings commonly used in mixed typesetting in PHP

# to determine whether a location is the left or right part of a Chinese character, or not # return value-1 left 0 not Chinese character 1 right # usage /* $a = ' This is Chinese '; Print Is_chinese ($a, 1); 0 Print Is_chinese ($a, 8); -1 Print

Form check box code to transfer data to PHP _php tips

The form check box is the checkbox 1, the Application of checkbox Copy Code code as follows: 2. Because I am transferring an array that is generated in the PHP loop, value is also set to a variable: For ($i =0 $i ?> ">

[PHP] Practical functions 9_php Tips

Executes an external program or an external instruction that enters the command. The return string is only the last line returned after the external program executes, and you can use PassThru () if you need to return the information

A piece of PHP encryption and decryption code _php tips

$key = "This is supposed to be a secret key!!!"; function keyed ($txt, $encrypt _key) { $encrypt _key = MD5 ($encrypt _key); $ctr = 0; $tmp = ""; for ($i =0; $i { if ($ctr ==strlen ($encrypt _key)) $ctr = 0; $tmp. = substr ($txt, $i, 1) ^ substr

PHP page output Search after jump to the next page of the processing method _php instance

PHP page output, search function in the jump next page, if do not do any processing, will return the original is the second page output data, with JS to the URL plus search conditions, to ensure that the next page when the output is the search data.

Example code _php using PHP to crawl spider crawler traces

Objective believe that many webmaster, bloggers may be most concerned about is nothing more than the inclusion of their own site, under normal circumstances, we can view the space server log files to see what the search engine has crawled our pages,

A simple and safe PHP authentication code class, PHP verification code _php Instance

One, sample verification code Second, PHP Authentication code class, secoder.class.php * @link http://l Abs.yulans.cn/yl_security_secoder * @link Http://wiki.yulans.cn/docs/yl/security/secoder * * Class Yl_security_ Secoder {/** *

PHP forged http_referer page URL source of three ways _php instance

PHP get the current page of the previous page URL address, that is, the current page from which page chain received, you can use $_server[' http_referer '], but this source page URL address can be forged and deceived, this article to introduce the

PHP uses ffmpeg to get information such as total time and code rate of video playback _php instance

Please note that PassThru is used in this article and may be partially disabled by a virtual master. The code is as follows: Php &1 '); function Getvideoinfo ($file) {$command = sprintf (Ffmpeg_path, $file); Ob_start (); PassThru

AJAX php No Refresh form submission simple implementation (recommended) _php instance

ajax.php: untitled document Name: Age: Gender: The ajax_output.php: "; echo "$userage "; echo "$usersex "; $db = new mysqli (' localhost ', ' root ', ' 123456 ', ' test '); if (! $db) { echo connection

Php+iframe implementation Hide No refresh upload file _php instance

First of all, Ajax can not upload files, which misled me for a while, I can't sleep tonight just follow the instructions to do a no refresh upload file Actually, it's a simple principle. Copy Code code as follows:

The implementation method of escape unescape php _php tips

function Escape ($STR) { Preg_match_all ("/[\x80-\xff].| [\x01-\x7f]+/", $str, $r); $ar = $r [0]; foreach ($ar as $k => $v) { if (Ord ($v [0]) $ar [$k] = Rawurlencode ($v); Else $ar [$k] = "%u". Bin2Hex (Iconv ("GB2312", "UCS-2", $v)); } return join

PHP High Custom security Authentication Code _php instance

Copy Code code as follows: Public Function Captcha () { $font _dir = $_server ["Document_root"]. "Your_ttf_file.ttf"; Font Library $img _w = 58; Set Picture width $img _h = 20; Set Picture height $font _size = 11; Font size $angle _l =-10;

PHP Shopping Cart Implementation code _php instance

shopcar.php Copy Code code as follows: Class Shopcar { Product List Public $productList =array (); /** * * @param the goods that the Unknown_type $product to pass in * @return True there is no such item in the Shopping cart */

PHP and SQL injection attack []_php techniques

These days too busy, continue to serial haha, for half a month to end. The database comes with unsafe input filtering capabilities, but not all databases have it. Currently, only Mysql,sqlite,postgresql,sybase has such a feature, and many

PHP Transparent watermark Generation code _php instance

Copy Code code as follows: /* * Created on 2010-10-27 * by QQ542900563 * Copyrights Reserved 2000-2020 * This example demonstrates how to create a picture watermark */ Load two photos separately $im =imagecreatefromjpeg ("liu.jpg");

PHP Imitation hotlinking code _php instance

Copy Code code as follows: /** * @author Seraphim * @copyright 2012 */ $ADMIN = Array ( ' Defaulturl ' => ' yun_qi_img/banner-header.gif ',//hotlinking return address ' Url_1 ' => ' http://www.xx.net/file ', ' Url_2 ' => ' http://www.xx.

JQuery php Pictures online cropping instance _jquery

/* Goofy 2011-11-29 * image processing: According to the coordinates passed over the parameters, X,y,w,h, followed by the selected x coordinates, y coordinates, W width, h height by the Imagecopy () method to the first step to create a blank image

Vista IIS7 Add PHP-supported settings Method _win Server

By the time the dispatch was made (September 25, 2009), PHP was the latest version of 5.3.0, but the 5.3.0 in IIS is fastcgi, and I never got it done on Vista IIS7. Finally I used the old method, ISAPI, selected a version of the previous 5.3, I

win2008 PHP running Environment set up a text tutorial _win server

Windows Server 2008 is based on the NT6 platform of the new operating system, its hardware performance compared to other NT platforms have a qualitative leap, has begun to spread to the vast number of users, and operations than 2003来 said more

Total Pages: 12780 1 .... 6828 6829 6830 6831 6832 .... 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.