Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/admin/mailout-debugger.php File Reference

Go to the source code of this file.

Functions

 mdie ($msg='', $errorcode=1)

Variables

if(!file_exists(dirname(__FILE__).'/mailout-debugger.enable')) $tmpdir = sys_get_temp_dir()
if(isset($_SERVER['REMOTE_ADDR']))
if(isset($_ENV['TMPDIR'])&&is_dir($_ENV['TMPDIR'])) 
$tmpfile = $tmpdir . '/moodle-mailout.log'
 $fh
 $stdin = fopen('php://stdin', 'r')

Function Documentation

mdie ( msg = '',
errorcode = 1 
)

Print an error to STDOUT and exit with a non-zero code. For commandline scripts. Default errorcode is 1.

Very useful for perl-like error-handling:

do_something() or mdie("Something went wrong");

Parameters:
string$msgError message
integer$errorcodeError code to emit

Definition at line 72 of file mailout-debugger.php.


Variable Documentation

$fh
Initial value:
 fopen($tmpfile, 'a+', false)
    or mdie("Error openning $tmpfile on append\n")

Definition at line 46 of file mailout-debugger.php.

$stdin = fopen('php://stdin', 'r')

Definition at line 51 of file mailout-debugger.php.

if (!file_exists(dirname(__FILE__).'/mailout-debugger.enable')) $tmpdir = sys_get_temp_dir()

Definition at line 35 of file mailout-debugger.php.

if (isset($_SERVER['REMOTE_ADDR'])) if (isset($_ENV['TMPDIR'])&&is_dir($_ENV['TMPDIR'])) $tmpfile = $tmpdir . '/moodle-mailout.log'

Definition at line 45 of file mailout-debugger.php.

 All Data Structures Namespaces Files Functions Variables Enumerations