如何查找图像是否存在于TPL文件中(smarty)


how to find if an image exists or not in tpl files (smarty)?

我必须检查文件是否存在于给定的路径。我尝试使用file_exists,但它不与我的smarty版本。请建议我如何检查图像是否存在于给定路径??

你可以试试这样做吗:

<>之前{assign var="image_name" value=$article.item_manufacturer|lower}{分配var = "图像"价值= "/home/sunflyer/public_html/媒体/制造商/$ image_name.gif "}{如果file_exists(图像美元)}