加入收藏 | 设为首页 | 会员中心 | 我要投稿 北几岛 (https://www.beijidao.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

php – 创建模块prestashop 1.5

发布时间:2021-08-28 03:48:49 所属栏目:大数据 来源: https://www.jb51.cc
导读:我在PrestaShop 1.5中创建了一个新模块 mau文件mymodule.PHP的内容 ?PHP if (!defined('_PS_VERSION_'))?? exit;? class myModule extends Module?? {?? public function __construct()???? {???? $this-name = 'mymodule';???? $this-tab = 'Test';???? $th

我在PrestaShop 1.5中创建了一个新模块
mau文件mymodule.PHP的内容

 <?PHP
  if (!defined('_PS_VERSION_'))
?? exit;
?
  class myModule extends Module
?? {
??  public function __construct()
???? {
????  $this->name = 'mymodule';
????  $this->tab = 'Test';
????  $this->version = 1.0;
????  $this->author = 'Firstname Lastname';
????  $this->need_instance = 0;
?
????  parent::__construct();
?
????  $this->displayName = $this->l('My module');
????  $this->description = $this->l('Description of my module.');
???? }
?
?? public function install()
????{
????if (parent::install() == false)
??????return false;
????return true;
????}
   public function uninstall()
    {
    if (!parent::uninstall())

    parent::uninstall();
    }
?? }
?>

但我有一个错误消息

mymodule (erreur de Syntaxe dans /modules/mymodule/mymodule.PHP)
mymodule (classe manquante dans /modules/mymodule/mymodule.PHP)

你能帮我吗

解决方法:

当我更改页面的编码(在没有BOM的UTF-8中编码)时,这个问题就解决了.

(编辑:北几岛)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读