cclark40 Posted November 14, 2008 Share Posted November 14, 2008 I assume this is possible in php? I have a page that gives a summary of results from croquet tournaments. http://www.croquetvic.asn.au/associationtournamentscompleted.php Each tournament has a unique identifier "tid". Some of the tournaments have results published in pdf format. I would like to put an IF statement in to provide a link to the pdf if it exists. The pdf filenames will be "tid".pdf and the pdf files will be in a subdirectory called "results" Quote Link to comment Share on other sites More sharing options...
rarebit Posted November 14, 2008 Share Posted November 14, 2008 if (file_exists($fn)) { $iret = 1; } will only work on files, not dirs! Quote Link to comment Share on other sites More sharing options...
JasonLewis Posted November 14, 2008 Share Posted November 14, 2008 Erm, file_exists can actually check to see if a folder exists as well. Quote Link to comment Share on other sites More sharing options...
cclark40 Posted November 15, 2008 Author Share Posted November 15, 2008 Too easy - I really am a "know-nothing!!" Worked like a dream first time!! Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.