dir name php
<?php
dirname(__FILE__);
?>
dir name php
<?php
dirname(__FILE__);
?>
__dirname javascript
console.log(__dirname) // "/Users/Sam/node-app/cronjobs"
console.log(process.cwd()) // "/Users/Sam/node-app"
__dirname javascript
console.log(__dirname) // "/Users/Sam/node-app/src/api"
console.log(process.cwd()) // "/Users/Sam/node-app"
php dirname
// dirname ( string $path [, int $levels = 1 ] ) : string
<?php
echo dirname("/etc/passwd") . PHP_EOL;
echo dirname("/etc/") . PHP_EOL;
echo dirname(".") . PHP_EOL;
echo dirname("C:\\") . PHP_EOL;
echo dirname("/usr/local/lib", 2);
// Above example outputs:
/*
"/etc"
"/" (or "\" on Windows)
"."
"C:\"
"/usr"
*/
__dirname javascript
node-app
├──index.js
├──public
├──src
│ ├──helpers.js
│ └──api
│ └──controller.js
├──cronjobs
│ ├──pictures
│ └──hello.js
└──package.json
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us