PHP to achieve the IP function [original]

2008-01-24 00:00:00 // This article by the original site: www.111cn.net Author: www.111cn.net Reprint please specify: from Www.111cn.net qq:271728967 // Get up early together suddenly see, my site someone in disgusting disorderly, in

[Original]PHP+AJAX implementation simulation win file management system seven

[Original]php+ajax to realize the simulation win file management system // This tutorial by the original site, reproduced please specify the place Author: www.111cn.net Email: drise@163.com qq:271728967 // The last file is the Js.js file.

PHP File upload Simple instance code

if ($_files[' file ']) {// ----------------------------------------------------------------------------------------------////Description: File Upload date: 2004-5-2//// ---------------------------------------------------------------------------------

PHP file System-based page Counter example

file System-based page Counter example The code is as follows Copy Code ? Php$countfile = "Num.txt";Defines that the file written by the counter is count.txt under the current directory, and then we should test

PHP Verification Code Instance Code

Session_Start ();Generate Captcha PictureHeader ("Content-type:image/png");$im = Imagecreate (44,18); Draw a picture that specifies the width and height$back = Imagecolorallocate ($im, 245,245,245); Define background colorImagefill ($im, 0,0, $back);

PHP adds content to file tail

If we want to-a file we need to open it up append mode. The code below does just that. */   code is as follows copy code $text = " Test.txt "; if (file_exists ($text) && is_file ($text) {   $fh = fopen ($myFile,

PHP numeric-alphanumeric and numeric regular validation expressions

The code is as follows Copy Code $str = ' 1-8732dsef83dfrese8732deef83dfrese '; It's written by a friend. The code is as follows Copy Code Var_dump (Preg_match ('/[0-9]+-[a-za-z0-9]{32}/', $str))

PHP cookie usage and cross-domain example tutorial

/*Grammar:Setcookie (Name,value,expire,path,domain,secure)Name,cookie name must be filled inValue, cookie values, must writeOther writable, but to illustrate the functionExpire expiration such as: Time () +3600*24Path path such as:/root directory,

PHP simple and practical to generate thumbnail code

The code is as follows Copy Code ?$w? $resizewidth = $w: $resizewidth =400;//to generate the width of the picture$h? $resizeheight = $h: $resizeheight =400;//The height of the picturefunction Resizeimage ($im, $maxwidth, $maxheight,

PHP collection remote server content code

Method simulates a user's access to a Web page The code is as follows Copy Code function Readpr ($link, $url){$fp = Fsockopen ($url, $errno, $errstr, 30);if (! $fp){echo "$errstr ($errno)";Exit (1);}Else{$out = "Get $link

PHP matches URL Regular expression code

$str = ""; The code is as follows Copy Code $reg = "[^ "']*)) | (? [^s>]+)) [ss]*?> "; The following example is to get the domain name regular expression in the content The code is as follows

Php cookie application instance

$ HTTP_COOKIE_VARS ["VisitTimes"]? ($ VisitTimes ++) :( $ VisitTimes = 1 );Setcookie ("VisitTimes", $ VisitTimes, time () + 31536000 );Echo " Welcome ". $ VisitTimes." Visit my homepage n ";?>Cookie is often used in WEB applications. The php

Php google map application instance code

Function selected ($ param, $ value ){If ($ param = $ value) print "SELECTED ";}# Collect any form data to control the display$ Scale = 10;$ Maptype = "G_NORMAL_MAP ";If ($ _ REQUEST [scale]) $ scale = $ _ REQUEST [scale];If ($ _ REQUEST [maptype]) $

Php access data connection and read save edit data

$ Conn = new com ("ADODB. Connection ");$ Connstr = "DRIVER = {Microsoft Access Driver (*. mdb)}; DBQ =". realpath ("www.111cn.net/db.mdb ");// The com interface is required for connecting to access.$ Conn-> Open ($ connstr );$ Rs = new com ("ADODB.

My original php Generic paging class, supports the top and bottom pages ..

Function fPageCount ($ TotalResult, $ numPerPage, $ Page ){$ NaviLength = '10'; // Display quantity$ ShowMorePageGo_Type _ = 0; // jump style$ Int_showNumberLink _ = '10 ';$ NonLinkColor _ = "#999999 ";$ ToF _ = " 9 ";$ ToP10 _ = " 7 ";$ ToP1 _ = "

Php fsockopen forges post and get methods

// Fsocket simulate post submission$ Purl = "http: // localhost/netphp/test2.php? Uu = rrrrrrrrrrrr ";Print_r (parse_url ($ url ));Sock_post ($ purl, "uu = 55555555555555555 ");// Fsocket simulate get submissionFunction sock_get ($ url, $ query){$

Php function code for adding watermarks and thumbnails to images

Php function code for adding watermarks and thumbnails to images/*** Watermarking an image* @ Param string $ desImg the target image parameter format is./images/pic.jpg.* @ Param string $ the watermark image parameter format is the same as above.

My views on PHP templates

The PHP template is indeed easy to say and do. There are more than 20 options for a random number. pear contains 5 different templates, which is really a headache.Never let everyone say that this is a good thing. Before you select a template, you 'd

Use PHP to receive POP3 mails (3)

Application instanceThe POP3 mail receiving class has already been described in detail in the previous article. Let's take a look at how to apply this class:Include ("pop3.inc. php ");$ Host = "pop.china.com ";$ User = "boss_ch ";$ Pass = "026007 ";$

PHP pdo transaction rollback code instance

$ This-> beginTransaction ();$ This-> exec ('update people set age = 2 ');// $ Step1 = mysql tutorial _ error (); // in your class, if an SQL error is executed, obtain the error code and function The code is as follows:Copy code $ This-> exec

Total Pages: 12780 1 .... 12252 12253 12254 12255 12256 .... 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.