1

在我看来,当包含使用一切的脚本时,<?php echo $this->Html->script('script.js'); ?>一切正常。但是,如果我将文件名更改为“script.min.js”,则 URL 呈现正常,但 CakePHP 拒绝提供脚本,而是返回以下内容:

Warning (2): include(/home/example/public_html/app/View/Themed/Type1/webroot/js/script.min.js): failed to open stream: Permission denied [CORE/Cake/Routing/Filter/AssetDispatcher.php, line 161]
Warning (2): include() [http://php.net/function.include]: Failed opening '/home/example/public_html/app/View/Themed/Type1/webroot/js/jquery.min.js' for inclusion (include_path='/home/example/public_html/lib:.:/usr/share/php:/usr/share/pear') [CORE/Cake/Routing/Filter/AssetDispatcher.php, line 161]

我都试过了<?php echo $this->Html->script('script.min.js'); ?><?php echo $this->Html->script('script.min.js', array('plugin' => false); ?>但到目前为止都没有。

解决方法是什么?

4

0 回答 0