while file

Alibabacloud.com offers a wide variety of articles about while file, easily find your while file information here online.

PHP recursive delete directory all files

function tree ($directory){$mydir =dir ($directory);echo "";while ($file = $mydir->read ()) {if ((Is_dir ("$directory/$file")) and ($file!= ".") and ($file!= "...")){echo " $file ";Tree ("$directory/$file");}else{$a = explode ('. ', $file);if ($a [1]

PHP Delete folder (you can delete folders that are not empty)

  code is as follows copy code /*—————————————————— */-Delete files and directories recursively– For example: Del_dir ('../www.1111cn.net/'); Note: returned/is required– $type Force Delete directory, true Yes, false no/*———————————

Delete files and folders in the specified directory

Method One function deltree ($dirList) {ChDir ($dirList);$handle =opendir ('. ');while ($file =readdir ($handle)) <> "") {if (Is_file ($file))Unlink ($file);if (Is_dir ($file) && $file <> "." && $file <> "...") {deltree ($file);ChDir ('.. ');RmDir (

RmDir Delete non-empty directory program code in PHP

The rmdir () function deletes an empty directory. Cases The code is as follows Copy Code $path = "Images";if (!rmdir ($path)){Echo ("Could not remove $path");}Else{Echo ' Delete directory failed because images is not

PHP uses recursive methods to list all the files in the current directory _php tips

This example describes how PHP uses recursive methods to list all the files in the current directory. Share to everyone for your reference. The implementation methods are as follows: function FileList ($pathname, $i) {Define a filelist

Six ways to invoke remote URLs in PHP summary _php tips

Example code 1: getting content with file_get_contents Copy Code code as follows: $url = ' http://www.baidu.com/'; $html =file_get_contents ($url); Print_r ($http _response_header); EC ($html); Printhr (); Printarr ($http

PHP shows pictures under specified path _php tips

Copy Code code as follows: function Getalldirandfile ($path) { if (Is_file ($path)) { if (Isimage ($path)) { $str = ""; $str. = ' "; $str. = ""; $path =iconv ("gb2312", "Utf-8", $path); $str. = "". $path. " "; $str. = ""; $str. = ""

PHP implementation of statistical directory file size function _php skills

Morning just to the company, the head told me, to write a small function, used to statistics specified in the directory file size, I have a go, do it, fortunately a little foundation, a will be completed, haha. The code is below. ? /**

ASP no component File upload code

Dim upload, File, MaxWidth, maxheight, Ofilestream, Bytes, ratio1, Ratio2 Set upload = new Upload_fileSet file = Upload.file ("pic") MaxWidth = CInt (upload. Form ("width")MaxHeight = CInt (upload. Form ("height") If file. FileSize > 0 Then

PHP Common function library and some practical tips _php tips

file-Reading functions FILE-Reading functions function Php_read ($file _name) { $FD =fopen ($file _name,r); while ($bufline =fgets ($FD, 4096)) { $buf. = $bufline; } Fclose ($FD); return $buf; } ?> File Write functionFile Write function function

A deep understanding of the difference between require and require_once and include and include_once _php skills

PHP is a fast, reliable, cross-platform application, open source code, and so on, making PHP one of the most popular server-side script language. I based on my experience in the work, to introduce you to the use of PHP experience, I hope to help you.

PHP to generate Zip compressed file method detailed _php Tips

Copy Code code as follows: Require_once "./include/zip.php"; $zip = new Phpzip (); $zip-> createzip ("folder directory address to compress", "compressed file name. zip"); Generate No automatic downloads only $zip-> downloadzip

A Plastic Futures Trading Program Analysis Chart program (Php+java)

Program Php+java's Program ..................... Java Program: /*The following procedure is a timing tracing analysis program for the futures trading data of Yuyao Plastics cityis a preliminary analysis of the data, drawing analysis to the further

Maintaining file systems with PHP

PHP has a lot of file system-related functions, not only can help you open the file, you can also display the contents of the directory, mobile files and so on. Many people even use PHP to write a web-based file manager. First you need to

List of file listings (cool)

[Program Language] Php [Source Source] Http://px.sklar.com [Feature description] The script reads the file names from a specified directory, returns them to the array, and includes the number of files. The source code is as follows: ? /* This

The tree structure lists the PHP classes for all files in the specified directory

? It is convenient to call this class to view all the files in the specified directory in a tree structure, if you want to know what subdirectories and files are in a directory. # Examples of demonstrations: $t = new Treeclimber ("ASP"); Create a

PHP enthusiasts look at: several useful functions

FILE-Reading functions FILE-Reading functionsfunction Php_read ($file _name) {$FD =fopen ($file _name,r);while ($bufline =fgets ($FD, 4096)) {$buf. = $bufline;}Fclose ($FD);return $buf;}?> File Write function File Write functionfunction Php_write

Using file attributes combined with session to realize online population statistics

Ob_start ();Session_Start ();$num = 0;$dirpt = "Online";$reftime = 1;if (Is_dir ($dirpt) && $dir = Opendir ($dirpt)) {while (($file = Readdir ($dir))!== false) {if (strcmp ($file, "..") ==0 | | strcmp ($file, ".") ==0) {Continue}$D _[date ("y-m-d

A case study of Dynamic Web technology PHP development file system

Focus on the application of file functions in PHP PHP has many file system-related functions that not only open files, but also display content, move files, and other features in the directory, and many people even use PHP to develop internet-based

Beginner's Introduction: 18 Examples of Dynamic web PHP

Site original content, reproduced please indicate the source Web page teaching network . How do we create our first PHP page? It's very simple! Choose one of the best design tools we use, and of course you can just use Notepad. After you create it,

Total Pages: 15 1 .... 11 12 13 14 15 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.