Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to run it in thinkphp6 , I try but not success #77

Open
yemaozi999 opened this issue Apr 12, 2024 · 0 comments
Open

How to run it in thinkphp6 , I try but not success #77

yemaozi999 opened this issue Apr 12, 2024 · 0 comments

Comments

@yemaozi999
Copy link

this is my start.php
`
namespace think;

require DIR . '/vendor/autoload.php';
require_once './public/slog.php';
// 定义CMF根目录,可更改此目录
define('CMF_ROOT', DIR . '/');
// 定义应用目录
define('APP_PATH', DIR . '/app/');
define('CONF_PATH', CMF_ROOT . '/config/');
//define('QJ_ADMIN_COMM', APP_PATH . '/admin/common/');
define('WEB_ROOT', DIR . '/');
define('VENDOR_PATH',DIR . '/vendor/');
define('PHINX_PATH', realpath(DIR . '/phinx-migrations-generator/bin/'));

require APP_PATH . '/Const.php';//常量表
class newApp extends App{
public function getConfigPath():string{
if(defined(CONF_PATH)){
return CONF_PATH;
}else{
return $this->rootPath . 'config' . DIRECTORY_SEPARATOR;
}
}
}

// 执行HTTP应用并响应
$http = (new newApp())->http;
$response = $http->run();
$response->send();
$http->end($response);
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant