dta43039 2019-02-16 17:55
浏览 26

如何包含其他目录的php文件的php文件(返回目录文件)?

you can see to different file address (1) and (2), i want to include header.php in index.php, but show error, i have used normal code in index.php: . sorry not working.

(1) localhost/folder1/index.php (2) localhost/folder2/header.php

Please help me.

  • 写回答

2条回答 默认 最新

  • dousao6313 2019-02-16 18:05
    关注

    In index.php you should put

    <?php
    include '../folder2/header.php';
    ?>
    
    评论

报告相同问题?