PHP+WORDPRESS

define( );和CONSTANT – 曹鹏PHP+WORDPRESS

define( 'EMPTY_TRASH_DAYS', 30 ); 

define( 'WP_ALLOW_REPAIR', true );

define( 'DISALLOW_FILE_EDIT', true );


// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( 'DB_NAME', 'database_name_here' );

/** MySQL database username */
define( 'DB_USER', 'username_here' );

/** MySQL database password */
define( 'DB_PASSWORD', 'password_here' );

/** MySQL hostname */
define( 'DB_HOST', 'localhost' );

Definition and Usage
The define() function defines a constant.

Constants are much like variables, except for the following differences:

A constant’s value cannot be changed after it is set
Constant names do not need a leading dollar sign ($)
Constants can be accessed regardless of scope
Constant values can only be strings and numbers
Syntax
define(name,value,case_insensitive)

1 Comment to “define( );和CONSTANT – 曹鹏PHP+WORDPRESS”

  1. 还好我英文好

Leave a Reply

学习的梦想

锤炼的彩色