zoukankan      html  css  js  c++  java
  • 在PHP5.4上使用Google翻译的API报错

    /**********************************************************************
     *             在PHP5.4上使用Google翻译的API报错
     * 说明:
     *     本来是想使用百度的翻译API,结果百度翻译:红色 --> gules。都不知道
     * 还能说什么好了。
     *
     *                                2018-3-16 深圳 宝安西乡 曾剑锋
     *********************************************************************/
    
    一、参考文档:
        1. Php 5.4 Version Not Working
            https://github.com/Stichoza/google-translate-php/issues/38
    
    二、错误现象:
        Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) in xxx/vendor/stichoza/google-translate-php/src/Stichoza/GoogleTranslate/TranslateClient.php on line 104
    
    三、解决办法:
        选择大于等于5.5版本的PHP。
  • 相关阅读:
    spring boot1
    部署 OpenStack VirtualBox
    SecureCRT连接虚拟机(ubuntu)配置
    深度优先算法和广度优先算法
    网上学习编程的七个趋势
    AI方向
    sql
    PyQt4入门
    “贪吃蛇”
    SecureCRT 专题
  • 原文地址:https://www.cnblogs.com/zengjfgit/p/8583028.html
Copyright © 2011-2022 走看看