DanielAttard
DanielAttard

Reputation: 3595

Manage multiple include files in 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.

Upvotes: 0

Views: 1796

Answers (1)

Ricardo Souza
Ricardo Souza

Reputation: 16446

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.

Upvotes: 1

Related Questions