You are here: help check if file exist and repond accordingly « PHP Language « IT news, forums, messages
help check if file exist and repond accordingly

Posted by JD on 07/06/05 05:38

What im trying to do is something like this maybe in my profile.php file


//site thumbnail check////////////
$filename = "sitethumbs/".$user['login'].".jpg";
if (file_exists($filename)) {
} else {
$t->assign('sitethumbs', $filename);
}
/////end////////////



then I have a file called viewprofile.html which uses the profile.php with
smarty templates so in this file I use


{if ($sitethumbs)}
<img src="members/sitethumbs/thumbs/{$user.login}.jpg" border="0"
width="145" alt="Visit {$user.login}'s website">
{/if}



Basicly in the template file it is always showing ($sitethumbs)

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация