Jump to content


die function

  • Please log in to reply
1 reply to this topic

#1 slipperyfish

  • Members
  • PipPipPip
  • Advanced Member
  • 40 posts

Posted 07 August 2006 - 02:20 AM

does anybody know of a javascript function that works the same as php's die() function?

#2 448191

  • Staff Alumni
  • Advanced Member
  • 3,545 posts
  • LocationNetherlands

Posted 07 August 2006 - 08:16 AM

There cannot be function in javascript that works the same as php's die().

Why, do you ask?

Because php's die() stops furter generation of a page on breakpoint. Javascript is executed after the page is already completely downloaded on the client. It's a big diff.

If you want to halt execution of your scripts for a requested page, the next best thing, I can only suggest you watch your codepaths.

If such a thing does exist, I'd like to know also.  :)

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users