Answers for "get file content using path php"

PHP
8

php get file contents

<?php
file_get_contents("file.txt");
?>
Posted by: Guest on May-12-2020
-1

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