jmckane Posted August 18, 2012 Share Posted August 18, 2012 I want to run each of these files from a file in the html dir called <runner.php> This code will run the first but not the second or third. Any assistance will be appreciated. Jim ==============code============= { include_once '/html/nu/admin/util/hourly.php'; } { include_once '/html/nt/admin/util/hourly.php'; } { include_once '/html/yt/admin/util/hourly.php'; } ========== end code================= Quote Link to comment https://forums.phpfreaks.com/topic/267264-run-multiple-files-include_once/ Share on other sites More sharing options...
hakimserwa Posted August 18, 2012 Share Posted August 18, 2012 not clear enough Quote Link to comment https://forums.phpfreaks.com/topic/267264-run-multiple-files-include_once/#findComment-1370427 Share on other sites More sharing options...
jmckane Posted August 18, 2012 Author Share Posted August 18, 2012 The code shown is for <runner.php> which will only run the first of the three commands. The last two do not run. Does this help? Quote Link to comment https://forums.phpfreaks.com/topic/267264-run-multiple-files-include_once/#findComment-1370432 Share on other sites More sharing options...
Pikachu2000 Posted August 18, 2012 Share Posted August 18, 2012 Because include_once() will only include a file once in a script, as the name implies. The behavior of the include and require functions is spelled out in the manual. Quote Link to comment https://forums.phpfreaks.com/topic/267264-run-multiple-files-include_once/#findComment-1370439 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.