What is better practice for script performance tuning?
This one?
require_once("db.php");
if (!is_cached()) {
require_once("somefile.php");
require_once("somefile2.php");
//do something
} else {
//display something
}
Or this one?
require_once("db.php");
require_once("somefile.php");
require_once("somefile2.php");
if (!is_cached()) {
//do something
} else {
//display something
}
Is it worth placing includes/requires into flow control structures or no?
Thank you
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…