2011-12-30 7 views
0

を生成し、私は私のニーズに応じてzf.batファイルのコードを変更したが、それは、このエラー "エラーが発生した生成アクション『*』の有効なアクションではありません! どうすればこの問題を解決できますか?すべてのコマンドで "私は、エラーが最後の行の最後の文字であると思いZend Frameworkの - zf.batファイルは、コマンドラインエラー

@ECHO off 
REM Zend Framework 
REM 
REM LICENSE 
REM 
REM This source file is subject to the new BSD license that is bundled 
REM with this package in the file LICENSE.txt. 
REM It is also available through the world-wide-web at this URL: 
REM http://framework.zend.com/license/new-bsd 
REM If you did not receive a copy of the license and are unable to 
REM obtain it through the world-wide-web, please send an email 
REM to [email protected] so we can send you a copy immediately. 
REM 
REM Zend 
REM Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) 
REM http://framework.zend.com/license/new-bsd  New BSD License 


REM Test to see if this was installed via pear 
SET [email protected] 
SET TMPZTMPZTMP=%ZTMPZTMPZTMPZ%[email protected] 
REM below @[email protected] 
FOR %%x IN ("@[email protected]") DO (if %%x=="%TMPZTMPZTMP%" GOTO :NON_PEAR_INSTALLED) 

GOTO PEAR_INSTALLED 

:NON_PEAR_INSTALLED 
REM Assume php.exe is executable, and that zf.php will reside in the 
REM same file as this one 
SET PHP_BIN=php.exe 
SET PHP_DIR=%c:\xampp\php 
GOTO RUN 

:PEAR_INSTALLED 
REM Assume this was installed via PEAR and use replacements php_bin & php_dir 
SET [email protected][email protected] 
SET [email protected][email protected] 
GOTO RUN 

:RUN 
SET ZF_SCRIPT=%PHP_DIR%\zf.php 
"%PHP_BIN%" -d safe_mode=Off -f "%ZF_SCRIPT%" -- %* 

: 以下は、バッチファイルのコードです。

EDIT:オリジナルファイルのコード

@ECHO off 
REM Zend Framework 
REM 
REM LICENSE 
REM 
REM This source file is subject to the new BSD license that is bundled 
REM with this package in the file LICENSE.txt. 
REM It is also available through the world-wide-web at this URL: 
REM http://framework.zend.com/license/new-bsd 
REM If you did not receive a copy of the license and are unable to 
REM obtain it through the world-wide-web, please send an email 
REM to [email protected] so we can send you a copy immediately. 
REM 
REM Zend 
REM Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) 
REM http://framework.zend.com/license/new-bsd  New BSD License 


REM Test to see if this was installed via pear 
SET [email protected] 
SET TMPZTMPZTMP=%ZTMPZTMPZTMPZ%[email protected] 
REM below @[email protected] 
FOR %%x IN ("@[email protected]") DO (if %%x=="%TMPZTMPZTMP%" GOTO :NON_PEAR_INSTALLED) 

GOTO PEAR_INSTALLED 

:NON_PEAR_INSTALLED 
REM Assume php.exe is executable, and that zf.php will reside in the 
REM same file as this one 
SET PHP_BIN=php.exe 
SET PHP_DIR=%~dp0 
GOTO RUN 

:PEAR_INSTALLED 
REM Assume this was installed via PEAR and use replacements php_bin & php_dir 
SET [email protected][email protected] 
SET [email protected][email protected] 
GOTO RUN 

:RUN 
SET ZF_SCRIPT=%PHP_DIR%\zf.php 
"%PHP_BIN%" -d safe_mode=Off -f "%ZF_SCRIPT%" -- %* 

EDIT:一つのコマンドによって生成されたエラーのスナップショット enter image description here

+0

もし誰でも解決できたら、私は彼に感謝するでしょう... – Krishna

+0

オリジナルの.BATファイルがどのように見えるかを示すならば、私はそれを修正する方法を見つけることができるでしょう。 – dbenham

+0

? - あなたはBATファイルを修正したと言った。私はあなたが行った変更を知る必要があります。だから私はあなたが変更を加えた前にファイルのコピーを頼んだのです。 – dbenham

答えて

0

変更このライン変更したコードで:

SET PHP_DIR=%c:\xampp\php 

宛先:

SET "PHP_DIR=c:\xampp\php" 

編集 - 私はとにかくパーサによって取り除かなっている元の変形例では、余分な%を実現したので、上記の提案は助けることができませんでした。


終わり%※と元の形に最後の行を復元する - これは、すべてのコマンドライン引数に拡大すべきです。しかし、それはあなたのために働いていません。理由を調べるには、リストアされた最後の行の直前に新しい行ECHO ONを追加します。

スクリプトを実行して、最後の行の解釈方法を確認します。それがなぜ機能していないのか分からない場合は、結果を投稿してください。

+0

これは機能していません! – Krishna

+0

"php.exe" -d safe_mode = off -f "c:¥xampp¥php¥zf.php" - *エラーが発生しました '*'は有効なアクションではありません。 – Krishna

+0

私の方法、すなわち%1%2%3 ...の代わりに、%*の代わりにnetbeansでzendプロジェクトのツリー構造を作成する必要がありました。だから、今問題はない。 – Krishna