这个 HTTP 标头是什么意思?
if (!defined('DIR_APPLICATION')) {
header('Location: install/index.php');
exit;
}
它是 OpenCart (PHP) 代码的一部分。
DIR_APPLICATION 是常量还是目录?在这种情况下,标题是什么意思?
在阅读了 Mozilla Developer Network和W3C之后,我仍然无法理解。
提前致谢
这个 HTTP 标头是什么意思?
if (!defined('DIR_APPLICATION')) {
header('Location: install/index.php');
exit;
}
它是 OpenCart (PHP) 代码的一部分。
DIR_APPLICATION 是常量还是目录?在这种情况下,标题是什么意思?
在阅读了 Mozilla Developer Network和W3C之后,我仍然无法理解。
提前致谢
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