繁体   English   中英

在Windows中轻松使用PHP doctrine CLI

[英]Using PHP doctrine CLI easily in windows

在Windows中,要从任何目录使用doctrine CLI,我需要使用类似的东西

php D:\full\path\to\doctrine\bin\doctrine.php --variables here

无论如何,我可以缩短它,使它成为类似的东西

php doctrine.php --variables here

甚至

doctrine --variables here

尝试doskey doctrine=php D:\\full\\path\\to\\doctrine\\bin\\doctrine.php $*

那么你应该能够在doctrine --variables heredoctrine --variables here

如果您不想在每个会话中输入该内容,可以将其导出到文件中:

doskey /macros > macros.txt

并在每个会话中导入:

doskey /macrofile=macros.txt

如果仍然有太多工作,您可以将它们添加到CLI的自动运行条目:

reg add "hkcu\\software\\microsoft\\command processor" /v Autorun /t reg_sz /d "%systemroot%\\system32\\doskey.exe /macrofile=path\\to\\your\\macros.txt"

请注意,通过这样做,您正在修改注册表,因此请谨慎使用。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM