使用Tag在PHP中显示外部文件

时间:2016-11-23 14:41:05

标签: php path tags

我有一个网站,我想在同一个PHP代码中显示许多不同的文件类型,但显示.txt.php文件有点困难。这是我的代码:

<?php
$display_files = "

    <div class=\"fileHoler\">
        <img src=\"path/to/image-file\" />
    </div>
    <div class=\"fileHoler\">
        <video width=\"460\" height=\"auto\" controls>
            <source src=\"path/to/video-file\">
        </video>
    </div>
    <div class=\"fileHoler\">
        path/to/text-file or path/to/php-file // How can I show the file>???
    </div>

";
?>
<?php echo $display_files; ?>

由于<img><video>标签,这完全显示了图像和视频文件,但有什么我可以用来显示类似方法的txt或php文件吗?

0 个答案:

没有答案