ajax - PHP: closing db connections on included and ajaxed files -


When I call a page through Ajax, should I finally close the connection?

Ajax file has a connection string for itself, so I'm surprised that the connection remains open when the call is finished, and if it is a disaster for not to close the connection ... < / P>

First of all thank you

When you call on a PHP page through AJAX, In order to explain the page, there are actually a new request from the server. The server does not know anything about the requested page via AJAX or by writing the address in the browser bar, it just interprets it as a new PHP page.

He said, all pending connections are automatically shut down, if you want, then enter mysql_close , otherwise PHP will do it for you. Use mysql_close () to view manual pages for

is usually not required, because non-continuous open links automatically stop at the end of execution of the script Are there.


Comments