我正在尝试使用Bing Ads API进行身份验证,但我收到此错误:
致命错误:第3行的PHP / PHP / Bing Ads API / PHP / v10 / KeywordsAds.php中的/../Bing Ads API中找不到类'BingAds \ Proxy \ ClientProxy'
这是我的代码:
<?php
$sql = "SELECT d.*, c.* from details as d, customer as c where d.customerId = c.id AND c.cmpId = '$idCompany'";
/*$sql = "SELECT * from customer where cmpId = '$idCompany' ";*/
$result = mysqli_query($conn, $sql);
while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
?>
<tbody>
<tr>
<td>
<?php echo $row['id'] ?>
</td>
<td>
<?php echo '<img src="images/'.$row['image'].'"; width="100px"; hieght="100px">' ?>
<a href="#" class="user-link"><?php echo $row['fname']." ".$row['lname']?></a>
<span class="user-subhead">Member</span>
</td>
<td>
<?php echo $row['time'] ?>
</td>
<td class="text-center countdown">
<!-- Countdown (please check this countdown where the expiry for each member has to echo but same expiry is echoing for all members)-->
<span class="label label-default getting-started"></span>
<script type="text/javascript">
$(".getting-started").each(function(){
$('.getting-started').countdown('<?php echo $row["expiry"] ?> ' , function(time) {
$(this).html(time.strftime('%w wk %d d %H h %M m %S s'));
});
})
//})
</script>
</td>
<td>
<a href="<?php echo $row['customerName']; ?>" data-toggle="modal" data-target="#smsModal" class="mobile"><?php echo $row['mobile'] ?></a>
</td>
<td style="width: 20%;">
<a style="float:left" data-toggle="modal" data-target="#memberInfo" href="<?php echo $row['id']; ?>" class="table-link clsMemberInfo view">
<span class="fa-stack">
<i class="fa fa-square fa-stack-2x"></i>
<i class="fa fa-search-plus fa-stack-1x fa-inverse"></i>
</span>
</a>
<a style="float:left" href="#" class="table-link" id="#save">
<span class="fa-stack">
<i class="fa fa-square fa-stack-2x"></i>
<i class="fa fa-pencil fa-stack-1x fa-inverse"></i>
</span>
</a>
<a href="<?php echo $row['id'] ?>" class="table-link danger delmodal" data-toggle="modal" data-target="#deleteModal">
<span class="fa-stack">
<i class="fa fa-square fa-stack-2x"></i>
<i class="fa fa-trash-o fa-stack-1x fa-inverse"></i>
</span>
</a>
</td>
</tr>
</tbody>
<div class="modal fade" id="deleteModal" class="" role="dialog">
<div class="modal-dialog modal-md">
<div class="modal-content">
<div class="modal-body text-center">
<p>Are you Sure you want to Delete ?</p>
</div>
<div class="modal-footer">
<div class="col-lg-7">
<form method="post" id="deleteForm">
<input type="hidden" id="MemberId" name="MemberId" value="<?php echo $row['id']?>">
<button type="submit" name="submit" id="yes_btn" class="btn btn-danger yes_btn">Yes</button>
</form>
<button type="button" id="no_btn" class="btn btn-success" data-dismiss="modal">No</button>
</div>
</div>
</div>
</div>
</div>
<?php
}
?>
我正在这个目录上执行它:
include 'bingads\v10\CampaignManagementClasses.php';
include 'bingads\ClientProxy.php';
// Specify the BingAds\Proxy objects that will be used.
use BingAds\Proxy\ClientProxy;
// Disable WSDL caching.
ini_set("soap.wsdl_cache_enabled", "0");
ini_set("soap.wsdl_cache_ttl", "0");
// Specify your credentials.
$UserName = "xxxx";
$Password = "xxxx";
$DeveloperToken = "xxx";
$CustomerId = "xxxx";
$AccountId = "xxxx";
// Campaign Management WSDL
$wsdl = "https://campaign.api.bingads.microsoft.com/Api/Advertiser/CampaignManagement/V10/CampaignManagementService.svc?singleWsdl";
$proxy = ClientProxy::ConstructWithAccountAndCustomerId($wsdl, $UserName, $Password, $DeveloperToken, $AccountId, null, null);
这是bingads \ ClientProxy.php
/../Bing Ads API in PHP/PHP/Bing Ads API in PHP/v10
答案 0 :(得分:1)
您应该使用composer来安装bing添加 -
https://github.com/CPCStrategy/bing-ads-sdk-php
这样你就不需要&#34;包括&#34;这样的文件,将能够利用自动加载,包括它们。