scandir

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

Rrmdir php in the recursive deletion of directories and directories in the file _php tips

Copy Code code as follows: function Rrmdir ($dir) { if (Is_dir ($dir)) { $objects = Scandir ($dir); foreach ($objects as $object) { if ($object!= "." && $object!= "...") { if (filetype ($dir.) /". $object) = =" dir ") Rrmdir ($dir.

PHP traversal file implementation code _php tips

Copy Code code as follows: function Files ($path) { foreach (Scandir ($path) as $line) { if ($line = = '. ' | | $line = = '.. ') Continue if (Is_dir ($path. ') /'. $line)) Files ($path. ' /'. $line); else echo ' '. $path. ' /'.

PHP common file operation functions Classic Collection _php Tips

The following is a personal summary of the PHP file manipulation function. Of course, that's just part of it, and there's a lot that I haven't listed. first, parse the path: 1 Get FileName: BaseName (); Gives a string containing a full path to a

PHP Directory functions in the detailed _php tips

Predefined constants: Directory_separator (String): Directory Separator Path_separator (String): Path separator BOOL ChDir (String $directory)-Change Directory Copy Code code as follows: Echo GETCWD (). "\ n";ChDir ('

H5 Learning _ _php database operation

1. File Operation 1.1 Open close file fopen ()resource fopen ( string filename, string mode [, bool use_include_path [, resource zcontext]] )?The fopen () function binds resource to a stream or handle. After binding, the script can interact

PHP MySQL database backup and data restore class

/*** Description, this class is suitable for small web site database backup, built-in MySQL connection, simply configure the data connection* and the location of the storage backup can be.* Class is materialized and you can connect to the database

PHP Phone number attribution to the query program code

Let's take a look at a program that calls a third method Web site The main use of curl implementation, need to open PHP to curl support. If you are setting up a Windows system in your php.ini file, find Php_curl.dll and cancel the preceding

Several ways to traverse directories and folders in PHP

Traverse the directory or traverse the directory of the specified type of file, this is every child shoe in the writing program will inevitably use. PHP itself also provides a lot of gray useful functions, use them correctly, there is no mistake.

Enables CI to automatically prompt CI-related classes and methods in NetBeans 8.0

Put these two files under the Nbproject folder in the root directory of the project file, run index.php such as: http://localhost/your CI directory/nbproject/index.php, and then restart NetBeans. Try writing $this-> to see what's going on back there!

thinkphp implementation to package local files into a zip download _php instance

First, place the Filetozip.class file in the thinkphp/extend/library/org/util/folder, FileToZip.class.php the zip download class with the following detailed code: currentdir= $curpath;//returns the current directory $this->savepath=$

FAQ Tutorials for LNMP environment use

First, the installation of LNMP # #先要下载 and installed according to different systems:Wget-c http://soft.vpser.net/lnmp/lnmp1.2.tar.gzTar zxvf lnmp1.2.tar.gzCD lnmp1.2./install.sh #开始进行安装操作For download and enter the installation process, the

PHP implementation file Encoding batch conversion _php instance

Some problems, can not repeat, such as GBK to UTF8, and then have in turn into UTF8, this will be garbled, I was trying to change before the conversion to detect the code, seemingly failed. I purposely tried a file, and I checked whether it was GBK

Some of the best prohibited functions in php.ini (Diables

PHP has a lot of functions, some functions are not safe, so we need to ban. So which functions are dangerous. Phpinfo ()   function Description: Output PHP environment information and related modules, WEB environment and other information.   Risk

Python gzip Library functions using methods and examples

Extract gzip Files Sample: import gzip f = gzip.open (' file.txt.gz ', ' RB ') File_ Content = F.read () f.close () Create gzip Files: import gzip content = "Lots of content here" f = gzip.open (' File.txt.gz ', WB ') f.write (content) f.close ()

Summary of PHP Execution Speed Optimization Techniques

1. When file_get_contents can be used to replace file, fopen, feof, fgets, and other methods, try to use file_get_contents, because its efficiency is much higher! Note the PHP version of file_get_contents when opening a URL file;2. Perform as few

Php backup mysql database program code

In our development, database backup is a very important part. Let's share two php backup mysql database classes. If you have any need, you can modify them. In our development, database backup is a very important part. Let's share two php backup

Uploading images using OSS

Set_time_limit (0);Introducing the auto-load classMake sure the path is correctRequire_once ' autoload.php ';Determining parameters requires application$accessKeyId = "* * * *";$accessKeySecret = "* * * *";$endpoint = "* * *

THINKPHP packs a local file into a zip download class

Provides various official and user-released code examples. For code reference, you are welcome to exchange and learn about a class you are using in your project. Integrated in TP, You can package local files into zip files and download them. Usage

Several useful PHP Functions

Reprinted: http://www.php100.com/html/webkaifa/PHP/PHPyingyong/2011/0708/8414_3.html 1. Any number of parameters of the Function You may know that PHP allows you to define a default parameter function. But you may not know that PHP also allows you

Build a high-performance lamp Platform Based on centos

Build a high-performance lamp Platform Based on centos Outline: I. System InstallationIi. Compile and install the Basic Environment3. Configure virtual hosts and optimize Basic PerformanceIv. Basic Security SettingsV. Appendix and related

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