Rochtus Posted June 21, 2009 Share Posted June 21, 2009 Is it possible in PHP to first "do" a file in the extern file you include or require And then show the result Because if you include it, it includes the file and then loads it in the file where you included it.. Link to comment https://forums.phpfreaks.com/topic/163132-external-file-laod/ Share on other sites More sharing options...
RussellReal Posted June 21, 2009 Share Posted June 21, 2009 what? Link to comment https://forums.phpfreaks.com/topic/163132-external-file-laod/#findComment-860678 Share on other sites More sharing options...
Rochtus Posted June 21, 2009 Author Share Posted June 21, 2009 Is there a PHP function that before it includes the file it runs the file? Link to comment https://forums.phpfreaks.com/topic/163132-external-file-laod/#findComment-860679 Share on other sites More sharing options...
Ken2k7 Posted June 21, 2009 Share Posted June 21, 2009 The file will be ran once it's included or required. I don't see the problem. Link to comment https://forums.phpfreaks.com/topic/163132-external-file-laod/#findComment-860682 Share on other sites More sharing options...
Rochtus Posted June 21, 2009 Author Share Posted June 21, 2009 Yes i know But i need to know or it is possible to first run it, and then include it Link to comment https://forums.phpfreaks.com/topic/163132-external-file-laod/#findComment-860683 Share on other sites More sharing options...
jmr3460 Posted June 21, 2009 Share Posted June 21, 2009 Do you want to write something to a file before anything is sent to the Browser then include is from inside your body tag? Link to comment https://forums.phpfreaks.com/topic/163132-external-file-laod/#findComment-860688 Share on other sites More sharing options...
DarkSuperHero Posted June 21, 2009 Share Posted June 21, 2009 think of it this way.... PHP FILE 1 RUN RUN RUN RUN PHP FILE 2 INCLUDED RUN RUN RUN BACKTO FILE 1 RUN RUN RUN RUN RUN EOF; hope that small diagram makes you see something, but that how php includes work...is that what your looking for ??? Link to comment https://forums.phpfreaks.com/topic/163132-external-file-laod/#findComment-860777 Share on other sites More sharing options...
mattal999 Posted June 21, 2009 Share Posted June 21, 2009 If I understand correctly, instead of actually including the PHP code into the file, you can use a file_get_contents on the file, and this will return the pre-ran source of the file (Like running it in the browser) instead of the PHP code. Hope this helps. Link to comment https://forums.phpfreaks.com/topic/163132-external-file-laod/#findComment-860780 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.