命令行运行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用作拐杖。 你觉得呢?你有没有什么想法?
命令行运行php文件