Browse Source

命令行运行目录调整

tags/6.0.0
llgoer 4 years ago
parent
commit
2a9ac29813
2 changed files with 7 additions and 1 deletions
  1. +2
    -0
      .gitignore
  2. +5
    -1
      dedecms

+ 2
- 0
.gitignore View File

@@ -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 View File

@@ -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('./'));
}

Loading…
Cancel
Save