Include whole content of a file and echo it

后端 未结 6 1087
迷失自我
迷失自我 2020-12-10 02:54

I need to echo entire content of included file. I have tried the below:

echo \"\";

echo \"inc         


        
6条回答
  •  青春惊慌失措
    2020-12-10 03:00

    Not really sure what you're asking, but you can't really include something via http and expect to see code, since the server will parse the file.

    If "script.php" is a local file, you could try something like:

    $file = file_get_contents('script.php');
    echo $file;
    

提交回复
热议问题