我正在尝试使用 Zend Service Livedocx。我在我的应用程序中使用了两个模型 - Submission 和 SubmissionFiles。我正在使用 SubmissionController 中的 Create 操作保存提交数据和 SubmissionFiles 数据。我试图在该操作中调用 MailMerge 类,但出现错误:致命错误:无法在 C:\wamp\www\publications\src\web\protected\vendors\ZendService\LiveDocx 中重新声明类 ZendService\LiveDocx\AbstractLiveDocx \AbstractLiveDocx.php
提交控制器
//一些代码
public function actionCreate()
{
$model=new Submission;
if(isset($_POST['Submission']))
{
$model->attributes=$_POST['Submission'];
if($model->save())
{
$modelFile = new SubmissionFiles;
if(isset($_POST['SubmissionFiles']))
{
Yii::import('application.vendors.zendservice.livedocx.*');
$phpLiveDocx = new MailMerge();
//somecode
protected/vendors/ZendService/LiveDocx/MailMerge.php
<?php
require_once 'ZendService\LiveDocx\AbstractLiveDocx.php';
class MailMerge extends AbstractLiveDocx
{ //somecode
protected/vendors/ZendService/LiveDocx/AbstractLiveDocx.php
<?php
namespace ZendService\LiveDocx;
use Traversable;
use Zend\Soap\Client as SoapClient;
use Zend\Stdlib\ArrayUtils;
abstract class AbstractLiveDocx
{ //some code
如果我评论 require_once 'ZendService\LiveDocx\AbstractLiveDocx.php'; 在 MailMerge.php 中,我收到错误: 致命错误:在 C:\wamp\www\publications\src\web\protected\vendors\ZendService\LiveDocx\MailMerge.php 中找不到类“AbstractLiveDocx”
我究竟做错了什么?