My webhost has been messing about with the PHP server side and scripts that have been running great for months have suddenly ground to a halt - a clear case of messing with something that wasn't broken.
Anyway, after a weekend of them looking at the problems the server was having and fixing them, the problem has now come back to me to fix, as all my php files need to be updated.
I didn't put a session_save_path() before session_start() in any of the files. This command seems to be sadly lacking much exposure and I missed it when learning PHP from a book. So I now need to wade through all these files and update them.
My question - all my files have a require_once('connections.php') statement somewhere in the first few lines. If I also include in connections.php the lines session_save_path(); and session_start(); will that work?
Also, in session_save_path([path]), if the path is left blank, am I correct in thinking that the server just defaults to something?
Thanks
require_once question
Moderator: General Moderators
LOLMy webhost has been messing about with the PHP server side and scripts that have been running great for months have suddenly ground to a halt - a clear case of messing with something that wasn't broken
anyways, as far as sessions and includes i'd say go for it. i see no reason why it wouldn't work at least..