Answers for "php get file information"

PHP
7

php get file contents

<?php
file_get_contents("file.txt");
?>
Posted by: Guest on May-12-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

Code answers related to "php get file information"

Browse Popular Code Answers by Language