1
我必须检查文件是否存在于给定的路径上。我尝试过使用file_exists,但它不适用于我的smarty版本。请建议我如何检查图像是否存在于给定路径?如何找到图像是否存在或不在tpl文件(聪明)?
我必须检查文件是否存在于给定的路径上。我尝试过使用file_exists,但它不适用于我的smarty版本。请建议我如何检查图像是否存在于给定路径?如何找到图像是否存在或不在tpl文件(聪明)?
你可以尝试这样的事:
{assign var="image_name" value=$article.item_manufacturer|lower} {assign var="image" value="/home/sunflyer/public_html/media/manufacturer/$image_name.gif"} {if file_exists($image)}
普莱舍写你的Smarty版本。 – Oyeme