mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-23 08:35:35 +08:00
update to build 404
fix ./zhamao command fix warning when first time starting framework
This commit is contained in:
@@ -53,7 +53,7 @@ class InitCommand extends Command
|
|||||||
echo "Copying ./zhamao\n";
|
echo "Copying ./zhamao\n";
|
||||||
file_put_contents(
|
file_put_contents(
|
||||||
$base_path."/zhamao",
|
$base_path."/zhamao",
|
||||||
"#!/usr/bin/env php\n<?php require_once \"vendor/autoload.php\";(new ZM\ConsoleApplication(\"zhamao-framework\"))->initEnv()->run();"
|
"#!/usr/bin/env php\n<?php require_once \"vendor/autoload.php\";(new ZM\ConsoleApplication(\"zhamao-framework\"))->initEnv(\"server\")->run();"
|
||||||
);
|
);
|
||||||
chmod($base_path."/zhamao", 0755);
|
chmod($base_path."/zhamao", 0755);
|
||||||
$autoload = [
|
$autoload = [
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ use ZM\Command\SystemdCommand;
|
|||||||
|
|
||||||
class ConsoleApplication extends Application
|
class ConsoleApplication extends Application
|
||||||
{
|
{
|
||||||
const VERSION_ID = 403;
|
const VERSION_ID = 404;
|
||||||
const VERSION = "2.4.3";
|
const VERSION = "2.4.4";
|
||||||
|
|
||||||
public function __construct(string $name = 'UNKNOWN') {
|
public function __construct(string $name = 'UNKNOWN') {
|
||||||
define("ZM_VERSION_ID", self::VERSION_ID);
|
define("ZM_VERSION_ID", self::VERSION_ID);
|
||||||
|
|||||||
@@ -256,7 +256,11 @@ class LightCache
|
|||||||
if (self::$kv_table === null) return;
|
if (self::$kv_table === null) return;
|
||||||
|
|
||||||
if (!empty(self::$config["persistence_path"])) {
|
if (!empty(self::$config["persistence_path"])) {
|
||||||
$r = json_decode(file_get_contents(self::$config["persistence_path"]), true);
|
if (file_exists(self::$config["persistence_path"])) {
|
||||||
|
$r = json_decode(file_get_contents(self::$config["persistence_path"]), true);
|
||||||
|
} else {
|
||||||
|
$r = [];
|
||||||
|
}
|
||||||
if ($r === null) $r = [];
|
if ($r === null) $r = [];
|
||||||
foreach ($r as $k => $v) {
|
foreach ($r as $k => $v) {
|
||||||
Console::verbose("Saving " . $k);
|
Console::verbose("Saving " . $k);
|
||||||
|
|||||||
Reference in New Issue
Block a user