In php, require-once and phprequire-once. In php, The require-once, phprequire-oncerequire_once statement and require statement are exactly the same, the only difference is that PHP will check whether the file has been included, if so, it will not package again in php require-once, phprequire-once
The require_once statement is identical to the require statement. The only difference is that PHP checks whether the file has been included. if so, it does not include the file again.
Refer to the include_once document to understand the meaning of _ once, and understand what is different from when _ once is not used.
Usage
Define ('', dirname (_ FILE __)));
Require_once (. '/config. php ');
?>
Method 2:
2 for example: Edit
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
Require_once ('sys/config. php '); Require_once ('header. php '); ?> System Platform A simple message board system platform
A simple message board. Require_once ('footer. php '); ?> |
The require_once statement and require statement are identical. The only difference is that PHP will check whether the file has been included. if so, it will not package again...