douji9816 2010-07-17 03:07
浏览 87
已采纳

在Windows中轻松使用PHP doctrine CLI

in windows, to use doctrine CLI from any directory i need to use something like

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

is there anyway i can shorten this so that it becomes something like

php doctrine.php --variables here

or even

doctrine --variables here
  • 写回答

1条回答 默认 最新

  • douyou1960 2010-07-17 03:27
    关注

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

    Then you should be able to do doctrine --variables here

    If you don't want to type that out every session, you can export it to a file:

    doskey /macros > macros.txt
    

    And import it every session:

    doskey /macrofile=macros.txt
    

    And if that's still too much work, you can add them to the Autorun entry for the CLI:

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

    Note that by doing this you are modifying your registry, so use caution.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥50 如何增强飞上天的树莓派的热点信号强度,以使得笔记本可以在地面实现远程桌面连接
  • ¥15 MCNP里如何定义多个源?
  • ¥20 双层网络上信息-疾病传播
  • ¥50 paddlepaddle pinn
  • ¥20 idea运行测试代码报错问题
  • ¥15 网络监控:网络故障告警通知
  • ¥15 django项目运行报编码错误
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services
  • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏