codeigniter_tutorial
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
17. Common Functions<br />
CodeIgniter<br />
CodeIgniter library functions and helper functions need to be initialized before they are<br />
used but there are some common functions, which do not need to be initialized.<br />
These common functions and their descriptions are given below.<br />
Syntax<br />
is_php($version)<br />
Parameters $version (string) – Version number<br />
Return<br />
TRUE if the running PHP version is at least the one specified<br />
or FALSE if not<br />
Return type void<br />
Description<br />
Determines if the PHP version being used is greater than the<br />
supplied version number.<br />
Syntax<br />
is_really_writable($file)<br />
Parameters $file (string) – File path<br />
Return<br />
TRUE if the path is writable, FALSE if not<br />
Return type bool<br />
Description checks to see if file is writable or not.<br />
Syntax<br />
config_item($key)<br />
Parameters $key (string) – Config item key<br />
Return<br />
Configuration key value or NULL if not found<br />
Return type mixed<br />
Description This function is used to get the configuration item.<br />
Syntax<br />
Parameters<br />
Return type<br />
Description<br />
set_status_header($code[, $text = ''])<br />
$code (int) – HTTP Response status code<br />
$text (string) – A custom message to set with the<br />
status code<br />
void<br />
This function permits you to manually set a server status<br />
header.<br />
Syntax<br />
Parameters<br />
Return<br />
Return type<br />
Description<br />
remove_invisible_characters($str[, $url_encoded =<br />
TRUE])<br />
$str (string) – Input string<br />
$url_encoded (bool) – Whether to remove URLencoded<br />
characters as well<br />
Sanitized string<br />
string<br />
This function prevents inserting NULL characters between<br />
ASCII characters<br />
68