Smarty Framework: file_exists api usage

$smarty.server.DOCUMENT_ROOT gives the root directory path.

{assign var=”deviceFileFullPath” value=”file://{$smarty.server.DOCUMENT_ROOT}/js/{$deviceName}.js”}

{if $deviceFileFullPath|file_exists}

{/if}

Leave a comment