User Tools

Site Tools


uphp:functions:die

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
uphp:functions:die [2017/02/22 08:25]
jeff
uphp:functions:die [2021/09/13 05:57] (current)
Line 1: Line 1:
 ======die====== ======die======
 +
 <badge>WMPRO, WMMINI FW >= 1.0</badge> <badge>WMMEGA FW >= 2.0</badge> <badge>WMPRO, WMMINI FW >= 1.0</badge> <badge>WMMEGA FW >= 2.0</badge>
  
Line 5: Line 6:
  
 ====Description==== ====Description====
-<well size="sm"><html><span style="font-size:125%;"></html>[[die]] ( ) + 
-</well>+<well size="sm"><html> 
 +<span style="font-size:125%">die ( ) 
 +</html></well>
  
 Terminates the current script Terminates the current script
  
 ====Parameters==== ====Parameters====
 +
 None None
  
-====Return Value====+====Return Values==== 
 None None
  
 ====Examples==== ====Examples====
-<code php><?  
-die(); //nothing beyond this line will be executed 
-while (1); //without the die() statement above we'd be stuck here until max_execution_time expires 
-?></code> 
  
-<code php><? +<code php> 
-//kill the script if not logged in as an administrator: +<? 
-if ($_SESSION['admin']==0) {die();} +  die(); // nothing beyond this line will be executed 
-?></code>+  while (1); // without the die() statement above we'd be stuck here until max_execution_time expires 
 +?> 
 +</code> 
 + 
 +===Kill a script if not logged in as an administrator=== 
 + 
 +<code php> 
 +<? 
 +  if ($_SESSION['admin']==0) die(); 
 +?> 
 +</code>
  
 ====Additional Information==== ====Additional Information====
 +
 Mainline PHP has a function or language construct ''exit()'' which is not implemented in uPHP. Mainline PHP has a function or language construct ''exit()'' which is not implemented in uPHP.
  
 ====See Also==== ====See Also====
-[[process_kill()]] - Send a kill request to the process number 
  
 +[[process_kill()]] - Send a kill request to a process
 +
 +[[max_execution_time()]] - Set the maximum execution time for the current script
  
uphp/functions/die.1487751931.txt.gz · Last modified: 2021/09/13 05:56 (external edit)