Pentiums Posted March 5, 2010 Report Share Posted March 5, 2010 Labdien, radās vienkārša sportiska interese. Kādas zālītes lietojam pēc header(); funkcijas izpildes? die();, vai exit; narkotiku? Quote Link to comment Share on other sites More sharing options...
briedis Posted March 5, 2010 Report Share Posted March 5, 2010 (edited) die ir exit ekvivalents http://www.php.net/manual/en/function.die.php Cik sapratu, tad die atgriež paziņojumu iekavās un izbeidz skriptu ar izejas kodu 0, bet ar pašu exit var norādīt vajadzīgo kodu, gan ziņojumu. (ja laiž no konsoles, noder zināt, ar kādu izejas kodu programma nosprāga) EDIT: vēl kaut kādi domu graudi: die doesn't prevent destructors from being run, so the script doesn't exit immediately, it still goes through cleanup routines. Edited March 5, 2010 by briedis Quote Link to comment Share on other sites More sharing options...
2easy Posted March 5, 2010 Report Share Posted March 5, 2010 ļoti labs piektdienas pēcpusdienas jautājums! :D:D:D hmm, man labāk patīk exit. die ir kkāds pārāk krimināls :P vsp varētu uztaisīt balsošanu: kas populārāks "exit" vai "die"? Quote Link to comment Share on other sites More sharing options...
briedis Posted March 5, 2010 Report Share Posted March 5, 2010 Laikam balošanu te nevar ielikt :( http://www.getonmyhorse.com/ Quote Link to comment Share on other sites More sharing options...
2easy Posted March 5, 2010 Report Share Posted March 5, 2010 http://www.getonmyhorse.com/ wtf? kas tā par zoofīliju??? Quote Link to comment Share on other sites More sharing options...
daGrevis Posted March 6, 2010 Report Share Posted March 6, 2010 Es par die()! :D Quote Link to comment Share on other sites More sharing options...
2easy Posted March 6, 2010 Report Share Posted March 6, 2010 (edited) es par kill() :D tipa "cits variants" :P tūlīt šis topiks aizies pie netēmas ;) Edited March 6, 2010 by 2easy Quote Link to comment Share on other sites More sharing options...
rATRIJS Posted March 6, 2010 Report Share Posted March 6, 2010 Es esmu atšķirīgs. Es daru tā: functions.php function epic_fail($status) { die($status); } index.php include('functions.php'); if(something_went_wrong()) { epic_fail('Ak feileris tu!!!'); } Quote Link to comment Share on other sites More sharing options...
2easy Posted March 6, 2010 Report Share Posted March 6, 2010 (edited) vēl viena alternatīva: game_over() bet nav smieklīgi :( Edited March 6, 2010 by 2easy Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.