Beginner's view: Dynamic Web page Making technology PHP constants type

Source: Internet
Author: User

PHP defines some of the following constants in the constants.

__file__

This default constant is the name of the PHP program file. If a reference file (include or require) is in the reference file, the constant is the reference file name, not the file name.

__line__

This default constant is the number of PHP program lines. If a reference file (include or require) is in the reference file, the constant is the row that refers to the file, not the file line that references it.

Php_version

This built-in constant is a version of the PHP program, such as ' 3.0.8-dev '.

Php_os

This built-in constant refers to the operating system name, such as ' Linux ', that executes the PHP parser.

True

This constant is the truth (true).

False

This constant is a pseudo value (false).

E_error

This constant refers to the nearest error.

E_warning

This constant refers to the nearest warning.

E_parse

This literal is a potential problem for parsing syntax.

E_notice

This constant is unusual but not necessarily wrong. For example, to access a variable that does not exist.

These e_ are the beginning of the constants, you can refer to the error_reporting () function, there are more relevant instructions.

Of course, in the process of writing, the above default constants are not enough. The Define () feature allows us to define the constants we need. See the following example

<?php
Define ("Copyright", "copyright©2007, http://www.webjx.com");
echo copyright;
?>



Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.