What is define function? [closed]

The define() function defines a constant. Constants are automatically global and can be used across the entire script.

In your example define('ABSPATH',dirname(FILE)."https://stackoverflow.com/"); ,defines a constant named ABSPATH, whose value is the result of dirname(FILE)."https://stackoverflow.com/" ie, parent directory’s path with a trailing slash

require_once(ABSPATH.'homepage.php'); includes the file 


Browse More Popular Posts

Leave a Comment