【问题标题】:PHP Fatal error: Uncaught Error: Class 'Google\Ads\GoogleAds\Examples\Utils\ArgumentParser' not found inPHP 致命错误:未捕获的错误:找不到类“Google\Ads\GoogleAds\Examples\Utils\ArgumentParser”
【发布时间】:2020-06-21 03:26:10
【问题描述】:

我正在尝试使用 google_ads_api 来生成关键字创意。 执行 generateKeywordsIdeas.php 文件时发现错误。

PS C:\xampp\htdocs\google_ads_api> php GenerateKeywordIdeas.php PHP 致命错误:未捕获的错误:在 C:\xampp\htdocs\google_ads_api\GenerateKeywordIdeas.php:67 中找不到类 'Google\Ads\GoogleAds\Examples\Utils\ArgumentParser' 堆栈跟踪:

#0 C:\xampp\htdocs\google_ads_api\GenerateKeywordIdeas.php(212): Google\Ads\GoogleAds\Examples\Planning\GenerateKeywordIdeas::main()
#1 {主要} 在第 67 行的 C:\xampp\htdocs\google_ads_api\GenerateKeywordIdeas.php 中抛出

致命错误:未捕获的错误:在 C:\xampp\htdocs\google_ads_api\GenerateKeywordIdeas.php:67 中找不到类“Google\Ads\GoogleAds\Examples\Utils\ArgumentParser” 堆栈跟踪:
#0 C:\xampp\htdocs\google_ads_api\GenerateKeywordIdeas.php(212):Google\Ads\GoogleAds\Examples\Planning\GenerateKeywordIdeas::main()
#1 {主要} 在第 67 行的 C:\xampp\htdocs\google_ads_api\GenerateKeywordIdeas.php 中抛出

这是我的项目的文件结构

为什么会发生这个错误..?谁能解释一下..?

【问题讨论】:

    标签: php keyword google-ads-api


    【解决方案1】:

    听起来像是“示例”目录中缺少所需的文件?当您从 github 下载包时,它们会从 ZIP 中排除。你可以在这里获取它们:

    https://downgit.github.io/#/home?url=https://github.com/googleads/google-ads-php/tree/master/examples

    【讨论】:

      猜你喜欢
      • 2023-03-25
      • 2018-04-19
      • 1970-01-01
      • 2018-01-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-09-06
      相关资源
      最近更新 更多