Transferred from: http://blog.csdn.net/peter_cloud/article/details/9308333Copyright Notice: This article for Bo Master original article, without Bo Master permission not reproduced. Unless your original is considered cross-platform. In Linux
Description of UseThe dirname command can take the directory portion of a given path (strip non-directory suffix from file name). This command is rarely used directly from the shell command line, and I typically use it in a shell script to get the
$ CD ' DirName $ ' and pwd%} display the current directory name${#var} to be replaced by the number of variable charactersSpecial variables$ current Shell's PID? Exit status of the previous command! PID of the previous work performed in the
In PHP, the dirname () function returns the directory portion of the path, __file__ the full path and file name of the currently running file. If used in the included file, the included file name is returned. This is a magic variable (predefined
First, Introduction1, dirname command to remove the non-directory part of the file name, delete the last "\" After the path, display the parent directory. Syntax: dirname [options] Parameter2. The basename command is used to print the directory or
Http://www.linuxidc.com/Linux/2008-09/15517.htm
In Linux, the PWD command and getcwd () function are commonly used to obtain directory paths. However, sometimes it is not easy to match common requirements. The problem comes from lightning. He
First, use the--HELP parameter to see it. basename command parameters are very small and easy to master.$ basename--helpUsage examples:$ basename/usr/bin/sort Output "sort".$ basename./include/stdio.h. H Output "stdio".To specify a path for basename,
Recently, when developing template functionality for WordPress, it was found that a path error occurred when invoking other PHP snippets directly in the form of include ("File name"). The server environment was always IIS, and there were no similar
Recently, when developing templates for wordpress, we found that path errors may occur when calling other php code snippets in the form of include ("file name. Previously, the server environment was always iis, and no similar bugs were found.
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.