What does this HTTP header mean?
if (!defined('DIR_APPLICATION')) {
header('Location: install/index.php');
exit;
}
It is part of OpenCart (PHP) code.
Is DIR_APPLICATION a constant or a directory? What does header mean in that context?
After reading Mozilla Developer Network and W3C , I still can not understand.
Thanks in advance
DIR_APPLICATION
is actually the constant defined to say where the main directory holding the controller
, language
, model
and view
directories are for the Admin/Catalog sections of the application. It is a full path structure of the local file system to the directory that is written to the config.php
when the installation is completed. It is defined in each of the two config.php
files and as such if it isn't defined, OpenCart assumes that there's not been an installation and redirects to the installation script. Not sure why you've referred to it as a header though as it's in no way a header
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.