<div id="hedar_main">
            <div id="hedar1">
               <?php include('menu.php')?>            
            </div><!--end of header1 -->
        </div><!--end of header-main -->
     </div><!--end of header -->

<div class="rightdiv">
               <?php include('local_auth.php')?> 

               <?php include('news.php')?>

               <div class="midal_right">
                <center><div class="divimg"><img src="images/home_img1.jpg" /></div></center>
                <center><div class="divimg"><img src="images/home_img2.jpg" /></div></center>
               </div><!--end of midal_right -->  
              </div><!--end of rightdiv -->
<div id="futter">
    <div id="futter_main">
        <div id="futter1">
         <?php include('footer.php'); ?>
      </div>
    </div>
</div>               

Here I included 4php file So my question is that is this proper way of coding please guide me ...
Thank you in advance..!

Recommended Answers

This is turning into a 'me too' thread. Can we all agree that you can, and wait for the OP to return? Oh darn, I just did it too. :(

Jump to Post

the various includes and requires have different uses, so choose the right one for the job. One isn't necessarily better than another in all cases.

Jump to Post

All 17 Replies

Re: can I include multiple files in php code 80 80

Yes this is all fine

Re: can I include multiple files in php code 80 80

Yes, you can include multiple files in PHP Code.

Re: can I include multiple files in php code 80 80

Having multiple files is possible :)

Re: can I include multiple files in php code 80 80

yes lol why not

Re: can I include multiple files in php code 80 80
Member Avatar

This is turning into a 'me too' thread. Can we all agree that you can, and wait for the OP to return? Oh darn, I just did it too. :(

commented: Good one :) +5
Re: can I include multiple files in php code 80 80

no problem but best for use

 include_onc() 

function

Re: can I include multiple files in php code 80 80

@rajeev,

That should be -

include_once()

:) Oh, almost forgot, me too. ;)

Re: can I include multiple files in php code 80 80

better still require_once()

Re: can I include multiple files in php code 80 80
Member Avatar

the various includes and requires have different uses, so choose the right one for the job. One isn't necessarily better than another in all cases.

Re: can I include multiple files in php code 80 80

you right in some cases

Re: can I include multiple files in php code 80 80

Thank you to all....!!

Re: can I include multiple files in php code 80 80
Member Avatar

OK, are we solved?

Re: can I include multiple files in php code 80 80

You may mark this solved now... hopefully this has answered your question.

Re: can I include multiple files in php code 80 80

@MICHAEL Sorry to say but I don't know how can I marked it solved??
Please help me...
Thank you.

Re: can I include multiple files in php code 80 80

Yes, you can add multiple includes. But, best you can add include_once instead of include.

Re: can I include multiple files in php code 80 80
Member Avatar

@MICHAEL Sorry to say but I don't know how can I marked it solved??

There's a link button at the bottom of the screen to mark the thread solved.

Re: can I include multiple files in php code 80 80

Thank you

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.