require_once(Google/Auth/AssertionCredentials.php): failed to open stream: No such file or directory

后端 未结 2 1430
我在风中等你
我在风中等你 2021-01-22 09:08

I\'m trying to do a very simple:

require_once \'vendor/google/src/Google/Client.php\';
require_once \'vendor/google/src/Google/Service/Plus.php\';
2条回答
  •  南方客
    南方客 (楼主)
    2021-01-22 09:59

    Above didn't work for my WordPress plugin, but I managed to solve it like this:

    In Client.php before require_once block add:

    set_include_path( plugin_dir_path( __FILE__ ) . '../' );
    

    Hope it helps.

提交回复
热议问题