PHP code example of lxclass / phpautoword

1. Go to this page and download the library: Download lxclass/phpautoword library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

lxclass / phpautoword example snippets


//documents_v1.php非固定文件可在类包lxclass\phpautoword\src\Documents.php 文件
  自动加载函数 $this->config = Config::get('documents_v1'); 内修改


return [
    'title' => "XXXX公司",  
    'description' => '"XXXX" | APi接口文档等等。',
    'apiurl' => 'http://xxx/xxx/', //API接口地址
    'version' => '1.0', //版本号
    'author' => 'XXX', //作者
    'template' => 'grape', // 苹果绿:apple 葡萄紫:grape
    'class' => [
        'app\sms\controller\Handle'
        // ...
    ],
];


/**
 * @authors Lx ([email protected])
 * @date    2018-06-30 14:12:34
 * @version $Id$
 */

namespace app\sms\controller;
use think\Controller;
use think\Db;

class Handle extends Controller {

	public function __construct(){
    }


    //创建短信模版
    /**
     * @title 创建短信模版
     * @desc  {"0":"接口地址:handle/createSmsTem","1":"请求方式:POST","2":"应用场景:创建短信模版 营销模版创建完毕后需提交模版请向短信平台报备 验证码模版不需要"}
     * @param {"name":"content","type":"int","* @return {"name":"data","type":"array","