diff --git a/.gitignore b/.gitignore index 364cbbb1..7d170aea 100644 --- a/.gitignore +++ b/.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/* diff --git a/dedecms b/dedecms index b82cd389..323ea70d 100755 --- a/dedecms +++ b/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('./')); } \ No newline at end of file