homepage Welcome to WebmasterWorld Guest from 54.163.84.199
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
Forum Library, Charter, Moderator: open

Flash and Shockwave Forum

    
How to check if a .swf exists
error checking
StoutFiles




msg:3934767
 12:37 am on Jun 17, 2009 (gmt 0)

I pass a GET variable to call my swf's with php. If a .swf doesn't exist, is there anyway I can know this and redirect to an error page or display an error message instead of a blank box where a flash file should be?

 

rocknbil




msg:3934803
 1:46 am on Jun 17, 2009 (gmt 0)

var $flash = '/full/path/to/swf/dir/' . $_GET['f']; // Cleanse!

if (is_file($flash)) { // display it }
else { // alt content }

Something like that?

StoutFiles




msg:3934837
 3:17 am on Jun 17, 2009 (gmt 0)

That worked perfectly! Thank you.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved