开发者

absolute path problem drupal

开发者 https://www.devze.com 2023-02-22 00:50 出处:网络
I have installed xampp and in the htdocs folder I have a folder called drupaldev. I need to give reference to a image in javascript but my images doesn\'t display. my image is in C:\\xampp\\htdocs\\dr

I have installed xampp and in the htdocs folder I have a folder called drupaldev. I need to give reference to a image in javascript but my images doesn't display. my image is in C:\xampp\htdocs\drupaldv\sites\all\modules\finder\images folder and I refered it in javascript as /drupaldv/sites/all/module开发者_开发知识库s/finder/images... What could be the reason for this... Please can someone explain... Thanks a lot!


You can make use of Drupal.setting.basepath variable. This gives you the document root for the drupal instance you are running. Append the rest of the required file path to this variable.

Hope this helps!!

0

精彩评论

暂无评论...
验证码 换一张
取 消