files-shared-code-tce-functions-errmsg

It appears that you are using AdBlocking software. The cost of running this website is covered by advertisements. If you like it please feel free to a small amount of money to secure the future of this website.

tce_functions_errmsg.php

Tags
file

Handle error/warning/system messages.
messagetype:

  • message
  • warning
  • error
author

Nicola Asuni

since
2001-09-17

Table of Contents

K_ALLOWED_ERROR_TAGS  = '<a><b><br><em><p><ol><ul><li><small><table><tr><th><td>'
HTML tags that are allowed in an error message.
F_print_error()  : mixed
Handle error/warning/system messages.
F_display_db_error()  : mixed
Print the database error message.
F_error_handler()  : mixed
Custom PHP error handler function.
F_url_exists()  : Returns
Check if the URL exist.
F_file_exists()  : Returns
Wrapper for file_exists.

Constants

K_ALLOWED_ERROR_TAGS

HTML tags that are allowed in an error message.

public mixed K_ALLOWED_ERROR_TAGS = '<a><b><br><em><p><ol><ul><li><small><table><tr><th><td>'

Functions

F_print_error()

Handle error/warning/system messages.

F_print_error([ $messagetype = 'MESSAGE' ][,  $messagetoprint = '' ][,  $exit = false ]) : mixed

Print a message

Parameters
$messagetype : = 'MESSAGE'

(string) Type of message: 0=no message, message; warning; error.

$messagetoprint : = ''

(string) message to print.

$exit : = false

(bool) if true output a message and terminate the current script [default = false].

Return values
mixed

F_display_db_error()

Print the database error message.

F_display_db_error([ $exit = true ]) : mixed
Parameters
$exit : = true

(bool) if true output a message and terminate the current script [default = true].

Return values
mixed

F_error_handler()

Custom PHP error handler function.

F_error_handler( $errno,  $errstr,  $errfile,  $errline) : mixed
Parameters
$errno :

(int) The first parameter, errno, contains the level of the error raised, as an integer.

$errstr :

(string) The second parameter, errstr, contains the error message, as a string.

$errfile :

(string) The third parameter is optional, errfile, which contains the filename that the error was raised in, as a string.

$errline :

(int) The fourth parameter is optional, errline, which contains the line number the error was raised at, as an integer.

Return values
mixed

F_url_exists()

Check if the URL exist.

F_url_exists(mixed $url) : Returns
Parameters
$url : mixed
Return values
Returns

TRUE if the URL exists; FALSE otherwise.

F_file_exists()

Wrapper for file_exists.

F_file_exists(mixed $filename) : Returns

Checks whether a file or directory exists. Only allows some protocols and local files.

Parameters
$filename : mixed
Return values
Returns

TRUE if the file or directory specified by filename exists; FALSE otherwise.

 

© 2004-2022 – Nicola Asuni - Tecnick.com - All rights reserved.
about - disclaimer - privacy