drupal中加载js时报连接不上文件
时间: 2015-09-07来源:开源中国
前景提要
HDC调试需求开发(15万预算),能者速来!>>> 在加载js时,以这种方式加载; scripts[] = ' bootstrap_clothes/js/affix.js' scripts[] = ' js/mainmenu.js' scripts[] = ' js/img.js'
出现了如下错误:
Warning : file_get_contents(sites/all/themes/bootstrap_clothes/ js/mainmenu.js): failed to open stream: No such file or directory in _locale_parse_js_file() (line 1488 of D:
mpps\htdocs\bootstrap\includes\locale.inc ). Warning : file_get_contents(sites/all/themes/bootstrap_clothes/ js/img.js): failed to open stream: No such file or directory in _locale_parse_js_file() (line 1488 of D:
mpps\htdocs\bootstrap\includes\locale.inc ). 然后我换了一种方法加载:在Template.php中用这种方式加载也出了上面这个警告:

function bootstrap_clothes_preprocess_html ( & $vars ) { $options = array ( 'group' => JS_THEME, ); $request_path = request_path (); if ( in_array ($request_path, array ( 'woman' ))) { drupal_add_js ( drupal_get_path ( 'theme' , 'bootstrap_clothes' ) . '/img.js' , 'file' ); } if ( in_array ($request_path, array ( 'front' , 'woman' ))) { drupal_add_js ( drupal_get_path ( 'theme' , 'bootstrap_clothes' ) . '/mainmenu.js' , 'file' ); } } 可以明确的是两个文件都在,而且目录显示的也没有错误,请问大神们,这怎么解决,是哪个文件需要配置或者修改?求指导。

科技资讯:

科技学院:

科技百科:

科技书籍:

网站大全:

软件大全:

热门排行