For beginners: Dynamic web page creation skills: constant type of PHP

Source: Internet
Author: User
Php defines the following constants in constants. The default constant _ file _ is the php program file name. If a file is referenced (include or require), the constant in the referenced file is the referenced file name, rather than the file name. _ Line _

Php defines the following constants in constants.

_ File __

The default constant is the php program file name. If a file is referenced (include or require), the constant in the referenced file is the referenced file name, rather than the file name.

_ Line __

The default constant is the number of php programs. If a file is referenced (include or require), the constant in the referenced file is the row of the referenced file, rather than the row of the file.

Php_version

This built-in constant is the version of the php program, such as '3. 0.8-Dev '.

Php_ OS

This built-in constant refers to the name of the control system that implements the php parser, such as 'Linux '.

True

This constant is the true value (true ).

False

This constant is a pseudo value (false ).

E_error

This constant indicates the most recent error.

E_warning

This constant refers to the nearest warning.

E_parse

This syntax is often used to include an ambush title in the parsing syntax.

E_notice

This formula is not common, but not necessarily an error. For example, you can access a non-existent variable.

The constants at the beginning of e _ can refer to the error_reporting () function for more coherent clarification.

Of course, when writing a program, the above default constants are not enough. The effect of define () allows us to define the required constants. See the following example.

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.