php get directory
$currentDirectoryName = basename(__DIR__);
echo 'Currently in the '.$currentDirectoryName .' directory <br><br>';
$fullPath = dir(getcwd());
echo 'The full path is: ' . $fullPath->path . '<br>';
php get directory
$currentDirectoryName = basename(__DIR__);
echo 'Currently in the '.$currentDirectoryName .' directory <br><br>';
$fullPath = dir(getcwd());
echo 'The full path is: ' . $fullPath->path . '<br>';
dir name php
<?php
dirname(__FILE__);
?>
php get file location
# C:\Users\Redacted\Desktop\main.php
include __DIR__ . DIRECTORY_SEPARATOR . 'include.php';
echoScriptPath();
# C:\Users\Redacted\Desktop\include.php
function echoScriptPath() {
list($scriptPath) = get_included_files();
echo 'The script being executed is ' . $scriptPath;
}
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