PHP will close all open files and DB connections at the end of the script. It's good practice to do it manually when you are done with the connections, but it's no disaster if you don't. If you have a DB connection that will be used throughout the whole script you can as well leave it open.
+1 on PDO
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…