Question about how INCLUDE and REQUIRE function
Posted: Mon Dec 30, 2002 5:45 pm
Is include and require both simply functions that are only called within their own code blocks, or are they parsed out before the script executes?
In other words if I use:
Will inlude only include myfile if $page == 0 or will the PHP engine include both files before executing the code?
The reason I ask is that one of my scripts are getting quite unweildly (8000 lines+) and I'm wondering if pageload time and overhead would be lessed if I split it into several pages that I can include where I needed it.
In other words if I use:
Code: Select all
if ($page = 0)
{ include 'myfile.php';
}
else
{ include 'myotherfile.php';
}The reason I ask is that one of my scripts are getting quite unweildly (8000 lines+) and I'm wondering if pageload time and overhead would be lessed if I split it into several pages that I can include where I needed it.