Answers for "how to get path in php"

PHP
2

php get url path name

parse_url( $_SERVER[ 'REQUEST_URI' ], PHP_URL_PATH );
Posted by: Guest on November-04-2020
0

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;
}
Posted by: Guest on June-19-2020
-1

how to know the path of php in linux

which php
Posted by: Guest on October-13-2020

Browse Popular Code Answers by Language