【发布时间】:2012-03-07 23:40:05
【问题描述】:
我需要获取图像的最终 url 以将其设置为 JQuery Datepicker 输入的参数。 DatePicker 的声明方式是:
$("#myInput").datepicker({
showOn: "button",
buttonImage: "<url-for-the-image>",
buttonImageOnly: true
});
我知道在 symfony 中图像位于(默认情况下)/web/images 目录中,可以使用 sfConfig::get('sf_web_dir').'/images' 访问。
问题是这个函数返回给我类似/var/www/.../web/images 而不是http://-IP-ADDRESS-/.../web/images。
如何在我的图像目录中找到正确的图像 URL?非常感谢!
【问题讨论】:
标签: php jquery image url symfony1