命令行运行php文件_从命令行运行PHP文件

命令行运行php文件

I've been brushing up on my shell scripting lately. I just got a MacBook and never felt compelled to spend too much time with Cygwin. I'm learning quite a bit now but there are still some tasks that I'd need to accomplish sooner rather than later. I know how to accomplish the task using PHP so I've got that to my advantage. What's awesome is that I can quickly and easily run my PHP files from the command line.

最近,我一直在重新整理我的shell脚本。 我刚有了MacBook,却从未感到要花太多时间在Cygwin上。 我现在学到了很多东西,但是仍然有一些任务需要我早日完成。 我知道如何使用PHP来完成任务,所以我已经从中受益。 很棒的是,我可以从命令行快速轻松地运行我PHP文件。

Shell脚本 (The Shell Script)


php doTask.php


I'm not sure whether I consider using PHP instead of a straight shell script as being resourceful or using PHP as a crutch. What are your thoughts?

我不确定我是考虑使用PHP而不是直接的shell脚本来获取资源还是将PHP用作拐杖。 你觉得呢?你有没有什么想法?

翻译自: https://davidwalsh.name/php-command-line

命令行运行php文件

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值