Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/226.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
我的模板或html的一部分消失了。为Prestashop 1.7.6.1、PHP7.1.9创建模块_Php_Css_Templates_Smarty_Prestashop 1.7 - Fatal编程技术网

我的模板或html的一部分消失了。为Prestashop 1.7.6.1、PHP7.1.9创建模块

我的模板或html的一部分消失了。为Prestashop 1.7.6.1、PHP7.1.9创建模块,php,css,templates,smarty,prestashop-1.7,Php,Css,Templates,Smarty,Prestashop 1.7,因为我不理解home.tpl文件中的一个div标记和一个类从我的代码中消失。该模块称为upload_data,它被组织在如下文件夹中: 这是我的密码 上传_data.php <?php class Upload_data extends Module { public function __construct() { $this->name = 'upload_data'; $this->author = 'Luis Sorto

因为我不理解home.tpl文件中的一个div标记和一个类从我的代码中消失。该模块称为upload_data,它被组织在如下文件夹中:

这是我的密码

上传_data.php

<?php
class Upload_data extends Module
{
    public function __construct()
    {
        $this->name = 'upload_data';
        $this->author = 'Luis Sorto';
        $this->version = '1.0.0';
        $this->bootstrap = true;
        parent::__construct();
        $this->displayName=$this->l('Upload CSV Files');
        $this->description=$this->l('This is a test module to upload csv files');
        $this->ps_versions_compliancy = array('min' => '1.7.0.0', 'max' => '1.7.99.99');
    }
    public function install()
    {
        return parent::install() && $this->registerHook('displayHome');
    }
    public function uninstall()
    {
        return parent::uninstall();
    }
    public function hookDisplayHome()
    {
        return $this->display(__FILE__, 'views/templates/hook/home.tpl');
    }
    public function hookHeader()
    {
        $this->context->controller->addCSS(array(
            $this->_path.'views/css/upload_data.css'
        ));
        $this->context->controller->addJS(array(
            $this->_path.'views/js/upload_data.js'
        ));
    }
    public function getContent()
    {
        return $this->display(__FILE__, 'views/templates/admin/configure.tpl');
    }
}
?>
当我使用xampp在localhoast中加载页面时,这就是我在检查代码时得到的结果

<div class="row">
    <img src="http://via.placeholder.com/1920x350">
</div>

我试着用google chrome工具编辑html,如果我添加了div和类,它会工作得很好。无论如何,很明显,当我刷新页面时,这个更改不会出现


我尝试过改变css文件的位置,并将其复制到任何地方,但对我来说都不起作用。还尝试更改className的标记类。希望这不是一个愚蠢的问题。

Prestashop有一个内置的移动设备检测器,你可以在模块设置中隐藏一些移动模块,这样你就可以检查了(因为Chrome打开了开发工具,我认为是移动设备)


Prestashop有一个内置的移动设备检测器,你可以在模块设置中隐藏一些移动模块,这样你就可以检查了(因为Chrome打开了开发工具,我认为是移动设备)


我认为问题与缓存有关。不确定是php、apache还是我的浏览器。我已经在php.ini中更改了一些内容,比如opcache.enable=0 opcache.revalidate\u freq=0,但这并没有改变问题我认为问题与缓存有关。不确定是php、apache还是我的浏览器。我已经在php.ini中更改了一些内容,比如opcache.enable=0 opcache.revalidate\u freq=0,但这并没有改变问题
.upload_data-img{width:100%;}
<div class="row">
    <img src="http://via.placeholder.com/1920x350">
</div>