What I was wondering is the following: When you call a script, lets call it makePage.php, clicking on a button and thus making an AJAX-request. Do I have to establish a new database connection? Even if I already established a connection to load in the page where the button is rendered on?
2条回答 默认 最新
weixin_33725807 2015-09-23 06:53关注the page you call with AJAX (more or less) acts like a page visited by a browser. there is no hidden magic going on, it's an independent page you load.
therefore you also have to care about database connections if you need them.
解决 无用评论 打赏 举报