die

What are the differences in die() and exit() in PHP?

﹥>﹥吖頭↗ 提交于 2019-11-26 09:41:48
What are the differences between die() and exit() functions in PHP? I think both have the same functionality, but I doubt there is something different in both... what is it? There's no difference - they are the same. PHP Manual for exit : Note: This language construct is equivalent to die() . PHP Manual for die : This language construct is equivalent to exit() . DIFFERENCE IN ORIGIN The difference between die() and exit() in PHP is their origin . exit() is from exit() in C . die() is from die in Perl . FUNCTIONALLY EQUIVALENT die() and exit() are equivalent functions. PHP Manual PHP Manual for

PHP: Utilizing exit(); or die(); after header(“Location: ”);

半腔热情 提交于 2019-11-26 03:44:20
问题 I have a user login/registration system that simply uses // execute queries, set cookies, etc. here header(\"Location: \" . getenv(\"HTTP_REFERER\")); I recently read a post about exit(); and die(); and had no idea that I was supposed to be using these. From what I understand, they make it end the PHP? Is that correct? What\'s the best way I can work toward this, simply adding one of these functions directly after ever header(); execution I have? I have AJAX, jQuery reading through my login

What are the differences in die() and exit() in PHP?

不打扰是莪最后的温柔 提交于 2019-11-26 01:56:12
问题 What are the differences between die() and exit() functions in PHP? I think both have the same functionality, but I doubt there is something different in both... what is it? 回答1: There's no difference - they are the same. PHP Manual for exit: Note: This language construct is equivalent to die(). PHP Manual for die: This language construct is equivalent to exit(). 回答2: DIFFERENCE IN ORIGIN The difference between die() and exit() in PHP is their origin . exit() is from exit() in C. die() is