Search code examples
phpcall

how can we call multiple php pages in one php page?


I have 4 php pages for different purposes, they are as follows:

readxmlfile.php : is ued to read data from "result.xml" file and insert data into "ci_result" table. After inserting data into "ci_result" table, the data is below:

id     result_list
1      Name = Ciclo-Attivo@Application solutions = @Softwares = @Application solutions = Portale-Ciclo-Attivo$ 1 3$ Ciclo-Attivo$ Portale-Ciclo-Attivo@map level = 0@CI Type = Business Process@                                          
2      Name = Portale-Ciclo-Attivo@Application solutions = @Softwares = @CIs = Fatturazione$ 3 4$ Portale-Ciclo-Attivo$ FatturazionedArco-Portal$ 3 6$ Portale-Ciclo-Attivo$ dArco-PortalMYLFRAdmin SR-CTH3G01$ 3 9$ Portale-Ciclo-Attivo$ MYLFRAdmin SR-CTH3G01@Impact analysis: configuration of the redundancy = The solution is up if all CIs are up@map level = 1@CI Type = Application Solution@ 

and so on...

loaddataintomaptable.php : is used to read the data from "ci_result" table and insert into "map_node" and "map_edge"table.

update_map_tables.php : is uesed to update the records in the "map_node" and "map_edge" table.

generate_bp_conf.php: is used to generate "bp.conf" file after updating "map_node" and "map_edge" tables.

The 4 php pages work properly when I "run" the pages one by one on web server. Now I want to call the 4 php pages in one php page to reduce the additional steps. does any one know how to call multiple pages in one php page ? exactly, can we do "http://localhost/web/pages/readxmlfile.php" for these 4 pages in one php page ?


Solution

  • You could try something like this:

    <?php
    include 'readxmlfile.php';
    include 'loaddataintomaptable.php';
    include 'update_map_tables.php';
    include 'generate_bp_conf.php';