getcwd函数_PHP getcwd()函数与示例
getcwd函數
PHP getcwd()函數 (PHP getcwd() function)
The full form of getcwd is "Get Current Working Directory", the function getcwd() is used to get the name of the current working directory, it does not accept any parameter and returns the current working directory.
getcwd的完整格式為“獲取當前工作目錄” ,該函數getcwd()用于獲取當前工作目錄的名稱,它不接受任何參數并返回當前工作目錄。
Syntax:
句法:
getcwd();Parameter(s):
參數:
It does not accept any parameter.
它不接受任何參數。
Return value:
返回值:
If function execution is the success, it returns the current working directory and it returns "FALSE" if function execution is failed.
如果函數執行成功,則返回當前工作目錄,如果函數執行失敗,則返回“ FALSE”。
Example: PHP code to get the name of the current working directory
示例:PHP代碼獲取當前工作目錄的名稱
<?php $result = getcwd(); echo "current working directory is: ".$result."<br/>"; ?>Output
輸出量
current working directory is: /home翻譯自: https://www.includehelp.com/php/getcwd-function-with-example.aspx
getcwd函數
總結
以上是生活随笔為你收集整理的getcwd函数_PHP getcwd()函数与示例的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 法的技能怎么有的看不到画面效果
- 下一篇: 中卫看多囊卵巢最好的医院推荐