如何在fuelphp中使用模块中的资产
我在我的模块中创建了一个名为 myview.php 的视图(名为 adminpanel) 路径(adminpanel\views\myview.php),因为我使用以下代码但资产未加载
<?php
use Fuel\Core\Asset;
use Fuel\Core\Session;
?>
<html>
<head><title>Admin Panel</title>
<?php Asset::js(array('jquery.js','test.js'));?>
</head>
<body>
<?php echo Session::get('my');?>
<input type="button" value="Call Designer Controller" >
</body>
这里 test.js 和 jquery.js 无法正常工作,我的浏览器中没有收到任何错误
I created one view called myview.php in my modul(Named adminpanel)
path(adminpanel\views\myview.php) in that I use following code but Assets are not load
<?php
use Fuel\Core\Asset;
use Fuel\Core\Session;
?>
<html>
<head><title>Admin Panel</title>
<?php Asset::js(array('jquery.js','test.js'));?>
</head>
<body>
<?php echo Session::get('my');?>
<input type="button" value="Call Designer Controller" >
</body>
here test.js and jquery.js are not work properly and I donot get any error in my browser
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Asset::js() 返回以字符串形式加载资源所需的 HTML。
如果你不 ECHO 它,什么都不会发生。
Asset::js() returns the HTML required to load the assets as a string.
If you don't ECHO it, nothing will happen.