The script file name that is currently being processed. If used in a contained file, its value is the included file, not the file name that contains it.
__line__
The current number of rows for the file being processed.
Php_version
Represents the current version of the PHP processor, such as: ' 3.0.8-dev '.
Php_os
The operating system name of the PHP processor, such as: ' Linux '.
TRUE
Truth
FALSE
False value
You can define more constants with the Define function.
For example, define constants:
Define ("CONSTANT", "Hello world.");
Echo CONSTANT; Outputs "Hello world."
?>
With examples of __file__ and __line__
function Report_error ($file, $line, $message) {
echo "An error occured in $file" line $line: $message. ";
}
Report_error (__file__,__line__, "something went wrong!");
?>
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.