Php folder operations

Source: Internet
Author: User
Stringbasename (stringpath [, stringsuffix]) is a string containing a full path pointing to a file. This function returns the basic file name. If the file name ends with suffix, this part will also be removed. In Windows, both the slash () and the backslash () can be used as Directory separators. In other rings

String basename (string path [, string suffix]) is a string containing a full path pointing to a file. This function returns the basic file name. If the file name ends with suffix, this part will also be removed. In Windows, both slash (/) and backslash (\) can be used as Directory separators. In other rings

StringBasename(String path [, string suffix])

A string containing a full path pointing to a file is provided. This function returns the basic file name. If the file name ends with suffix, this part will also be removed.

In Windows, both slash (/) and backslash (\) can be used as Directory separators. It is a slash (/) in other environments (/).

StringDirname(String path)

A string containing a full path pointing to a file is provided. This function returns the directory name after removing the file name.

In Windows, both slash (/) and backslash (\) can be used as Directory separators. It is a slash (/) in other environments (/).

ArrayPathinfo(String path [, int options])

Pathinfo () returns a union array containing path information. It includes the following array units: dirname, basename, and extension.

You can use the options parameter to specify the units to be returned. They include:PATHINFO_DIRNAME, PATHINFO_BASENAME and PATHINFO_EXTENSION. By default, all units are returned.

StringRealpath(String path)

Realpath () extends all symbolic connections and processes '/./', '/./' and excess '/' in the input path, and returns the normalized absolute path name. There is no symbolic connection in the returned path, '/./' or.

If realpath () fails, FALSE is returned. For example, if the object does not exist. On the BSD system, if only the path does not exist, PHP does not return FALSE as other systems do.

Document Excerpt from php folder operations

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.