在 PHP 中管理多个包含文件

发布于 2024-12-22 16:38:54 字数 810 浏览 2 评论 0原文

我有一个 main.php 文件,其中包含以下三个包含的 php 文件:

    <!--TAB 1--->
    <?php include "tab1.php"; ?>        
    <!--TAB 2--->
    <?php include "tab2.php"; ?>                      
    <!--TAB 3--->
    <?php include "tab3.php"; ?>                      

当我在 Dreamweaver 中打开 main.php 时,我可以访问这 3 个包含的文件。我的问题是:这些包含文件之一中包含的文件怎么样?

例如,tab2.php 文件引用这些 php 文件:

    <?php include "a.php"; ?>        
    <?php include "b.php"; ?>                      
    <?php include "c.php"; ?>                      

为了能够编辑另一个包含文件中的这些包含文件,需要做什么?我需要直接打开它们吗?

我想要做的是打开 main.php,然后能够添加所有 6 个包含文件:

tab1.php
tab2.php
tab3.php
a.php
b.php
c.php

似乎我只能直接访问第一级包含文件。有什么建议吗?谢谢。

I have a main.php file which has the following three included php files:

    <!--TAB 1--->
    <?php include "tab1.php"; ?>        
    <!--TAB 2--->
    <?php include "tab2.php"; ?>                      
    <!--TAB 3--->
    <?php include "tab3.php"; ?>                      

When I open main.php in Dreamweaver, I have access to these 3 included files. My question is: What about files that are included inside one of these include files?

For example, the tab2.php file reference these php files:

    <?php include "a.php"; ?>        
    <?php include "b.php"; ?>                      
    <?php include "c.php"; ?>                      

In order to be able to edit these included files which are inside another include file, what needs to be done? Will I need to open those directly?

What I would like to be able to do is open main.php and then be able to add all 6 included files:

tab1.php
tab2.php
tab3.php
a.php
b.php
c.php

It seems as though I only have direct access to the first-level include files. Any suggestions? Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

幼儿园老大 2024-12-29 16:38:54

如果您使用的是 Dreamweaver CS5,它有一个(默认启用)选项,可以在文件选项卡下方的一行中显示包含内容。如果您的包含内容包含其他包含内容,则直接从此文件编辑此包含内容的唯一方法是在包含内容中按 CTRL+D,然后 Dreamweaver 将显示一个弹出窗口,供您选择包含内容进行编辑,它将在选项卡中打开所选的内容。

If you're using Dreamweaver CS5, it has an (default enabled) option to show includes in a line below the file tabs. If you have an include that has other includes, the only way of editting this includes directly from this file is to press CTRL+D in the include, then Dreamweaver will show a popup for you to select the includes to edit and it will open the selected one in a tab.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文