Forum Moderators: coopster
I'm a fairly experienced programmer in terms of working things out etc. and I know the differnce in terms of includes and require statements. But in terms of how php 'works' I still have a lot to learn in that area.
Now my question regarding includes and requires is:
Are the files in these statements 'included' after the base file has loaded or does the compile merge them all together at runtime as it were and process it as one file?
The reason I ask is because, if you had a file with lots of includes, is it possible to load the basepage and then display a loading indicator using some javascript or ajax etc. to show where another file is loading (if it is an especially large file). Almost as if the included file is a control that, although is part of the page, it's almost as if it is viewed as a seperate section (like an image gallery might have a loading indicator when a new image is loading.)
Hope that is clear enough.
Many Thanks
I feel like the only way to include a large file and have a loading screen is if you combined javascript, ajax, and php together in one application. The javascript and the ajax would send a request to the server to load the file, and if need be send pertinent information to the script. The ajax would continue to show a loading graphic until ajax actually receives a reply from the server. At that time you would end the loading screen or whatever and output the data to the screen.
Experiment with a few things and see how it works. If you find other solutions, please be sure to post them here for other member to see.
Thanks
[edited by: ChainsawXIV at 8:39 am (utc) on Jan. 20, 2008]
[edited by: dreamcatcher at 10:01 am (utc) on Jan. 20, 2008]
[edit reason] no urls as per T.O.S [webmasterworld.com].Thanks [/edit]