Cakephp 显示代码而不是选项的蛋糕外壳

Cakephp 显示代码而不是选项的蛋糕外壳,cakephp,cakephp-2.1,Cakephp,Cakephp 2.1,当我试着打开蛋糕壳的时候。。我收到一条很奇怪的消息。。见下文 X-Powered-By: PHP/5.4.11 Content-type: text/html ################################################################################ # # Bake is a shell script for running CakePHP bake script # PHP 5 # # CakePHP(tm) : Ra

当我试着打开蛋糕壳的时候。。我收到一条很奇怪的消息。。见下文

X-Powered-By: PHP/5.4.11
Content-type: text/html

################################################################################
#
# Bake is a shell script for running CakePHP bake script
# PHP 5
#
# CakePHP(tm) :  Rapid Development Framework (http://cakephp.org)
# Copyright 2005-2012, Cake Software Foundation, Inc.
#
# Licensed under The MIT License
# Redistributions of files must retain the above copyright notice.
#
# @copyright    Copyright 2005-2012, Cake Software Foundation, Inc.
# @link         http://cakephp.org CakePHP(tm) Project
# @package      app.Console
# @since        CakePHP(tm) v 2.0
# @license      MIT License (http://www.opensource.org/licenses/mit-license.php)
#
################################################################################
LIB=$(cd -P -- "$(dirname -- "$0")" && pwd -P) && LIB=$LIB/$(basename -- "$0")

while [ -h "$LIB" ]; do
        DIR=$(dirname -- "$LIB")
        SYM=$(readlink "$LIB")
        LIB=$(cd "$DIR" && cd $(dirname -- "$SYM") && pwd)/$(basename -- "$SYM")
done

LIB=$(dirname -- "$LIB")/
APP=$(dirname $(cd $(dirname $0) && pwd))

exec php -q "$LIB"cake.php -working "$APP" "$@"

exit;
你知道怎么解决这个问题吗

我使用的是PHP5.4.11,我没有对cakephp的代码做任何更改


谢谢

我是从cake调用该方法的。。不是cake.php

多亏了@noslone

要加载shell,应该编写以下命令

$  php cake.php (Then the appropriate shell name)

您没有指定调用shell的“方式”。确切的命令是什么?您可能正在尝试运行cake,但也可以从应用程序中运行cake.php:
php控制台/cake.php
path@mark,我尝试运行的命令是$cake bake@noslone,以下是我运行命令时的输出
Status:404 Not Found X-Powered-By:PHP/5.4.11 Content type:text/html未指定输入文件。
我之所以想使用shell,有几个原因,1是为了i18n,另一个是身份验证和授权。更新:因为我在控制台目录中,所以404出现了。。。我想外壳现在可以工作了。。谢谢@noslone!