grs5211 Posted June 2, 2009 Share Posted June 2, 2009 I have this code: $dir_handle = opendir($path) or die("Unable to open $path"); What I want to do is goto a javascript function if the path fails instead of just the message output. I would like to do this: $dir_handle = opendir($path) or die(execute my 'function'); Any thoughts!! Quote Link to comment Share on other sites More sharing options...
Garethp Posted June 2, 2009 Share Posted June 2, 2009 if(!opendir($path)) { //execute function } Try that Quote Link to comment Share on other sites More sharing options...
grs5211 Posted June 2, 2009 Author Share Posted June 2, 2009 That worked well. 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.