浏览代码

命令行运行目录调整

tags/6.0.0
llgoer 5 年前
父节点
当前提交
2a9ac29813
共有 2 个文件被更改,包括 7 次插入1 次删除
  1. +2
    -0
      .gitignore
  2. +5
    -1
      dedecms

+ 2
- 0
.gitignore 查看文件

@@ -9,3 +9,5 @@ src/install/install_lock.txt
src/install/index.php.bak
src/install/index.html
src/install/module-install.php.bak
src/a/*
src/uploads/allimg/*

+ 5
- 1
dedecms 查看文件

@@ -7,6 +7,10 @@
* @package DedeCMS.Command
* @copyright Copyright (c) 2007 - 2019, DesDev, Inc.
*/
// 切换工作目录到./src
$workDir = dirname(__FILE__)."/src";
chdir($workDir);

if (substr(php_sapi_name(), 0, 3) === 'cgi')
{
die("DedeCMS:needs php-cli to run\n\n");
@@ -20,5 +24,5 @@ if (count($argv) > 1 && $argv[1] == "serv") {
}
echo "Start Dev Server For DedeCMS\n\r";
echo "Open http://localhost:8088\n\r";
passthru(PHP_BINARY . ' -S localhost:8088 -t'.escapeshellarg('./src'));
passthru(PHP_BINARY . ' -S localhost:8088 -t'.escapeshellarg('./'));
}

正在加载...
取消
保存