duanjingsen7904
duanjingsen7904
2016-10-17 08:23

如何通过Shell脚本调用公共静态成员方法(PHP类)?什么是“phpr”?

已采纳

I have read a shell script:

#!/bin/bash
function do_export{

      phpr Job_Sync_Third > /tmp/Job_Sync_Topoc.log 2>/dev/null

}

do_export

This code is to call the main functin of a class(Job_Sync_Third). I found this class throungh the "grep -rnw -e" command.

The Following is the class:

require_once(xxxx);
class Job_Sync_Third
{
         protected $__config = array();
         public function run () {}
         static public function main()
         {
                 $job = new Job_Sync_Third();
                 $job->run();
         }
}

The "phpr" calls the static method in the Job_Sync_Third. It is being installed below the "/usr/bin" directory. How did it do it in a shell script calls the static member function of the class?And what is the "phpr"? I can't get any useful information from Google.

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

1条回答

  • douci4026 douci4026 5年前

    The "phpr" maybe is a parser of the author compile.

    点赞 评论 复制链接分享

相关推荐