Php

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

php character matching code

php tutorial character matching code / * string A: "1,3,4,5,6,7,8,9,10,11,12,14,15,17,20,22,123,457", for example, I want to know this String contains "2", this time "12", "20", "22", etc. * / / a if (in_array ('2', explode (',', $ ...

PHP file download based on database records

PHP Tutorial File download is a database tutorial based on the records and then use the header in PHP to achieve file download. ? Include './admin/connect.php '; @extract ($db->get_one ("select * from Movieinfo where id= '. $_get[' id ']."); $db->query (...)

PHP Common bubble Method and recursive sorting algorithm code

PHP Common sort bubbling and recursive sort algorithm code bubble sort algorithm function Bubblesort ($arr) {$n =count ($arr); for ($i =0; $i < $n $i + +) {for ($j = $i; $j <=-1 $j + +) {if ($arr [$i]> $arr [$j]) {$temp = $arr [$i]; $arr [$i]= $arr [$j]; $ ...

PHP record search engine spider crawl page code

PHP Tutorial Records search engine Tutorials Spider Crawl page code error_reporting (E_all & ~e_notice); $TLC _thispage = addslashes ($_server[' http_referer '].$_server[' php_self '));/* ($_server [' http_host '].$_SERVER[' PHP _self ']);($_server[' HT ...

Pomm Beta-1 Publish PHP Object management

Pomm is a lightweight, fast, efficient and powerful PHP object management for postgresqlhttp://www.aliyun.com/zixun/aggregation/22.html "> relational Database model." Pomm generates code work from its speed and its rich feature settings with PostgreSQL benefits. It uses SQL as the query language because it is often the orms used by developers, making it easier to optimize queries directly. This also allows developers to ...

PHP detection array length function sizeof count

php tutorial to detect the length of the array function sizeof count in php detection array length function sizeof count Now see a simple example * / $ colorlist = array ("apple" => "red", "grass" => "green", " sky "=>" bl ...

Php get native mac address three ways

php tutorial to get the native mac address three ways getmacaddr {var $ return_array = array (); / / return string array with mac address var $ mac_addr; ...

PHP to remove duplicate words from strings and generate index strings

/php the repeating word in the string, generates the index string, and the string parameter is a string//--------------------------------------------------function Getindextext ($ Okstr, $ilen =-1) {if ($okstr = = "") r ...

PHP to $_post,$_get filter single and double quotes security functions

PHP Tutorials for $_post,$_get filter single quotes and double quotes security functions function _strips Tutorial Lashes ($string) {if (Is_array ($string)) {foreach ($string as $key = > $val) {$string [$key] = _strips Tutorial Lashes ($val) &n ...

php get the string uft-8 encoding

php tutorial to get the string uft-8 encoding // method one echo preg_replace ('# [x {4e00} -x {9fa5}] # ue', 'chinese_unicode (' ") '," hello, china "); / Guarantee "Hello, China" is utf-8. function chinese_unicode ($ c) {& n ...

PHP generated pictures and verification code picture generation principle

This PHP tutorial generates pictures and verification code picture generation principle code, is by the PHP GD library to support, if your system can not create a picture on the front of the Gd.dll; ? $w? $RESIZEWIDTH = $w: $RESIZEWIDTH =400;//to generate the width of the picture $h? $RESIZEHEIGHT = $h: $RESIZEHEIGHT =400;//The height of the picture fun ...

PHP Bulk Delete all files and folders under the directory

PHP Tutorial Bulk Delete all files and folders under directory//delete directory All files/methods One $dir = "Test";     function Defiles ($dir) {$handle =opendir ($dir); while ($file =readdi ...

php authentication user name legitimacy code

php tutorial to verify the legitimacy of the user name regular code We verify this user name is a regular validation of letters, numbers, username, not including Chinese Oh. function funcstrnum ($ str, $ num1 = '', $ num2 = '') // alphanumeric {if ($ num1! = '' and $ num2! = '') {return (preg_match ("/ ^ [^ a-z0-9a-z _@!.-] {& q ...

PHP Seven kinds of cache control output instance code

PHP tutorial Seven kinds of cache control output instance code can be opened according to the cache or not, there are several different ways of writing: note: The following code does not consider the IE cache must be greater than 256 bytes to output the problem, such as in IE test, please add a sentence in the code: "Echo str_repeat (", 256) "1:output_buffering = Off Implicit_flush=off for ($i =0; $i <10; $i + +) ...

PHP collection remote server content code

PHP several collection remote server content code/method One imitates the user to access the Web page function Readpr ($link, $url) {$fp = Fsockopen ($url, $errno, $errstr, 30);   if (! $fp) {echo "$errstr ($errno) n"; E ...

PHP Ad Click Count code

PHP Ads Click Statistics Code, last night there are several IDC network to work with this site to put some ads, but I want to see the effect of advertising after the write a simple advertising statistics code, here is only the statistics can not IP restrictions or nausea click and so on. First, create the database. CREATE TABLE IF not EXISTS ' ad_count ' (' ad_id ' int (8) Not NULL auto_increment, ' Ad_h ...

PHP addslashes processing $_post $_get Array function

PHP addslashes processing $_post $_get Array function This is my one equivalent to an automatic version of the feature used to process the $ _post array useful <?php function add_slashes ($an _array) {foreach ($ An_array as $key => $value) {$new _array[$key ...

PHP Get checkbox Bulk Delete data code

PHP Tutorial Get checkbox Bulk Delete data code <form action= "? action=doing" method= "POST" > <input name= "id_dele[]" type= "checkbox" Id= "id_dele[]" value=&quo ...

php produces arbitrary length string + numeric random number of code

Can customize what kind of string and how long [PHP] Code function random ($ length) {$ hash = ''; $ chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz'; $ max = strlen ($ chars) - 1; mt_s ...

Several defense PHP program by Trojan attack configuration detailed method

Several defense PHP Tutorial program by Trojan Attack configuration detailed method <!doctype HTML public "-//W3C//DTD XHTML 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/ Dtd/xhtml1-transitional.dtd "> <html xmlns=" http: ...

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