Answers for "php get file mime"

PHP
-2

php get file mime type

echo mime_content_type("yourfile.gif"); //image/gif
Posted by: Guest on February-12-2021
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

Browse Popular Code Answers by Language