phpstudy所有软件,已经通过360安全检测认证,phpstudy linux web面板(docker),已发布安全检测与修复

posix_getcwd

  • 24

posix_getcwd

(PHP 4, PHP 5)

posix_getcwdPathname of current directory

说明

string posix_getcwd ( void )

Gets the absolute pathname of the script's current working directory. On error, it sets errno which can be checked using posix_get_last_error()

返回值

Returns a string of the absolute pathname on success. On error, returns FALSE and sets errno which can be checked with posix_get_last_error().

范例

Example #1 posix_getcwd() example

This example will return the absolute path of the current working directory of the script.

<?php
echo 'My current working directory is '.posix_getcwd();
?>

注释

Note:

This function can fail on

  • Read or Search permission was denied
  • Pathname no longer exists

  • posix_access
  • posix_ctermid
  • posix_errno
  • posix_getcwd
  • posix_getegid
  • posix_geteuid
  • posix_getgid
  • posix_getgrgid
  • posix_getgrnam
  • posix_getgroups
  • posix_getlogin
  • posix_getpgid
  • posix_getpgrp
  • posix_getpid
  • posix_getppid
  • posix_getpwnam
  • posix_getpwuid
  • posix_getrlimit
  • posix_getsid
  • posix_getuid
  • posix_get_last_error
  • posix_initgroups
  • posix_isatty
  • posix_kill
  • posix_mkfifo
  • posix_mknod
  • posix_setegid
  • posix_seteuid
  • posix_setgid
  • posix_setpgid
  • posix_setsid
  • posix_setuid
  • posix_strerror
  • posix_times
  • posix_ttyname
  • posix_uname
  • PHP MySQL HTML CSS JavaScript MSSQL AJAX .NET JSP Linux Mac ASP 服务器 SQL jQuery C# C++ java Android IOS oracle MongoDB SQLite wamp 交通频道

    微信扫码登陆

    打开 微信
    扫一扫登录