Page 1 of 1

Will using <?PHP include " ";?> make our websites load fast?

Posted: Thu Apr 28, 2011 9:38 am
by Netroxy
Ive used a couple of includes in my web page. I thought of the idea to remove some of the PHP code from the main .php page because I am hearing that overloading a single page with lines of PHP can slow down that page itself. So I put some of the codes into separate .php files. For example, I removed the unique visitor counter code out of the main page and placed it into a separate file called counter.php and I called that page with <?PHP include "http://www.blabla.com/counter.php" ; ?>. Same goes for the counter script that shows how many users are online. Is it better to use includes with our webpages? Does it make our pages load faster? Are there any benefits for using it?

Re: Will using <?PHP include " ";?> make our websites load f

Posted: Thu Apr 28, 2011 9:56 am
by pickle
There are no PHP-only benefits to using include files. The benefit is solely to help you to maintain the code. Breaking off different functionality into different files, simplifies each file for when you need to edit them.