这是来自CMS的index.php文件。 Namespace
看起来不错。
<?php
Namespace
{
use nutshell\Nutshell;
/**
* Nutshell bootsrapper.
* This overrides Nutshell's default bootsrapper.
*
* @global
* @return Void
*/
function bootstrap()
{
define('PUBLIC_DIR', __DIR__ . DIRECTORY_SEPARATOR);
Nutshell::setApplictionPath(__DIR__.'/../private/application');
Nutshell::registerDefaultConfig('example'); //your application name
try
{
Nutshell::getInstance()->application->NutsNBolts();
Nutshell::getInstance()->application->example(); //your application name
}
catch(\Exception $exception)
{
var_dump($exception);
}
}
/* By including nutshell below, the framework will
* auto-initiate. Nutshell will detect our custom bootstrap
* and execute it.
*/
require __DIR__ . '/../private/lib/nutshell/Nutshell.php';
}
?>
答案 0 :(得分:0)
请在第一行添加命名空间,删除'Namespace',转到''namespace project1'