Phpfile_exists: determines whether a file exists. If yes, true or 1 is returned. If no, false or 0-PHP source code is returned.

Ec (2); & nbsp; file_exists ($ filename); & nbsp; * =filewww.111cn.net.txt; & nbsp; if (file_exists ($ file) & nbsp; {& nbsp; echo $ file, exists; & nbsp ;}& nbsp; else & nbsp ;{& nbsp script ec (2); script File_exists ($ filename );*/ $ File

Php submits data and saves php-encoded file instances-PHP source code

Ec (2); if ($ _ POST) {& nbsp; $ str2312, 34 & nbsp; 781,34512, 8933,; & nbsp; $ contentnl2br ($ str); & nbsp; $ contentstr_replace (& quot;, & quot;, $ content); & nbsp; $ script ec (2); script If ($ _ POST){ $ Str = '23 = 78 = 45 =, = 33 '; $

Php simulates web page browsing code-PHP source code

Ec (2); classHttpRequest {var $ sHostAdd; var $ sUri; var $ iPort; var $ sRequestHeader; var $ sResponse; functionHttpRequest ($ sUrl) {$ sPatternUrlPart ([a-z -. 0-9] +) (:( d +) {0, 1 }(. *) I; $ ar script ec (2); script Class HttpRequest{Var $

Php uses phpexcel to generate an excel document instance-PHP source code

Ec (2); ini_set (& quot; display_errors & quot;, 1); Whether to display the error message ini_set (include_path, ini_get (include_path ).; d: www.111cn. nethtdocslianxi1.7.2Classes); set this page to contain the path require_once (& quot ;. 1.7.2

Php obtains the length of two-dimensional or multi-dimensional arrays-PHP source code

Ec (2); in the php tutorial, obtain the length of the first dimension of a two-dimensional or multi-dimensional array. This is a common program judgment. For example, the array you read is a two-dimensional array: & lt ;? Php $ arrarray (& nbsp; 0 &

Php digit-mixed Regular Expression for letters and numbers-PHP source code

Ec (2); & nbsp; Code copy Code as follows $ str1-8732dsef83dfrese8732DEef83dfrESe; Have friends write like this & nbsp; copy the code var_dump (preg_match ([0-9] +-[a-zA-Z0-9] {32}, $ str); script ec (2); script The Code is as follows:

Php saves network images and automatically collects and saves remote images and files-PHP source code

Ec (2); * $ dirwww.111cn.net; & nbsp; if (strstr ($ src, & quot;) & amp ;! Strstr ($ src, $ _ SERVER [HTTP_HOST]) {& nbsp; $ srcgetimg ($ src); & nbsp ;}& nbsp; & nbsp; functiongetimg (script ec (2); script */$ Dir = '/www.111cn.net '; If (strstr (

Php user-defined random password function-PHP source code

Ec (2); & lt ;? Originally Zend.com, used by hunter reproducted *: $ new_passwordreturn_password (); example: Generate password: 2X5bjj2z, ERgid62Y, p2sHtDPv * & nbsp; copy the code functionreturn_password () as follows () {s script ec (2); script

Php data cannot be inserted into the Access database-PHP source code

Ec (2 );? & Gt; & lt ;! DOCTYPEHTMLPUBLIC & quot;-W3CDTDHTML4.01TransitionalEN & quot; www. w3.orgTRhtml4loose. dtd & quot; & gt; & lt; html & gt; & lt; head & gt; & lt; title & gt; UntitledDoc script ec (2); script ?> Untitled Document $ _

Php file read/write operations-PHP source code

Ec (2); & nbsp; functionread ($ filename, $ filesze) & nbsp ;{& nbsp; & nbsp; $ fpfopen ($ filename, & quot; rb & quot;); Use the fopenrb & nbsp; attribute to read files and use flocklock_sh and lock_un to unlock & nbsp; if ($ fp) & nbsp; {& nbsp; &

Php outputs digital code as an image-PHP source code

Ec (2); defines the output as the image type $ n10; variable $ n is the number of digits of the display. Use the above method to obtain the number of accessors and assign the value to the variable $ str1 (Program omitted) $ str1 $ count; $ str2 &

Several different styles of php paging code (1/8)-PHP source code

Ec (2); functionoutPege ($ ps tutorial, $ page) {$ ps Total Information $ page Current page quantity $ max list max $ min list min $ max & nbsp; & nbsp; ($ page & gt; 5 )? $ Page + 5:10; if ($ max & gt; $ ps) $ max $ ps; $ min & nbsp; & script ec (2)

Several Methods for php to filter all html tags-PHP source code

Ec (2); use regular expressions to filter html tags & nbsp; copy the code $ html_body & quot; & lt; ahref # & gt; www.111cn.net & lt; a & gt; & quot; preg_replace (& quot; (& lt ;?) (W +) ([^ & gt;] * & gt;) e & quot;, & nbsp; & nbs script ec (2);

Php Remote paging-PHP source code

Ec (2 ); page_total_rows-display quantity per page default value: 20 $ total_rows-Total number of data entries $ totpages-Total number of pages calculation $ pages_current-the current page uses url parameters to pass the current page number url

Detailed description of php Cache Technology Principles and Examples (1/15)-PHP source code

Ec (2); Cache Technology: & nbsp; some information remains unchanged for example, but it can still be changed to cache to speed up display, this is very valuable. The so-called cache is commonly understood as sharing information stored on the server.

Function in_array-PHP source code used to determine whether an array contains a character or string

Optional & quot;, & nbsp; & quot; w script ec (2 ); script The Code is as follows: $ Arr_1 = array ("Index/logo.png ","Www.111cn.net/play.png ","Movie/stop.png ","Game/war_p.png ","Game/starcaft_p.png ","Music/fly.png");

Php intercepts string functions (supports Chinese and different encodings)-PHP source code

This article provides three php string truncation functions with their own characteristics. All string truncation functions support Chinese Character truncation, which solves the garbled problem. Method 2: supports multiple encoding interceptions.

Php use session User Login tutorial-PHP source code

Ec (2); & nbsp; if ($ _ POST [submit]) {& nbsp; $ usernamestr_replace (& quot;, & quot; & quot;, $ _ POST [username]); & nbsp; $ SQL & quot; select * fromuser_listwhere 'username' script ec (2 ); script If ($ _ POST [submit]) {$ Username =

Common php verification code-PHP source code

Ec (2); function name: CheckMoney ($ C_Money) & nbsp; function: Check whether the data is in the 99999.99 format & nbsp; & nbsp; parameter: $ C_Money (number to be checked) & nbsp; Return Value: Boolean Value & nbsp; & nbsp; script ec (2); script /

Phpmysql paging code and paging principle-PHP source code

This phpmysql paging code and paging code are suitable for beginners of php, from creating a database and querying data to paging data, this paging code is easy to use. This article provides the php mysql paging code and paging code, which is

Total Pages: 12780 1 .... 7339 7340 7341 7342 7343 .... 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.