tomjung09 Posted July 31, 2009 Share Posted July 31, 2009 Hi. I am trying to use the require_once function in php to include a file. It is working in Chrome, and Firefox but not in IE8 and I cannot figure out why. Main file (home.php) <?php require_once 'salvagedrides.php'; require_once 'zipcodefunctions.php'; ?> the two files are in the same directory, it has no problem with salvagedrides.php but fails when I try to include the zipcodefunctions.php Any ideas why? The website is http://www.salvagedrides.com/usa/home.php Quote Link to comment https://forums.phpfreaks.com/topic/168236-require_once-function-is-not-working-in-ie/ Share on other sites More sharing options...
dadamssg Posted July 31, 2009 Share Posted July 31, 2009 try using <?php include("salvagedrides.php"); ?> Quote Link to comment https://forums.phpfreaks.com/topic/168236-require_once-function-is-not-working-in-ie/#findComment-887373 Share on other sites More sharing options...
tomjung09 Posted July 31, 2009 Author Share Posted July 31, 2009 Thanks for the reply. It's actually the zipcodefunctions that I am having issues with. I tried include("zipcodefunctions.php"); and include 'zipcodefunctions.php'; No luck with either one. Quote Link to comment https://forums.phpfreaks.com/topic/168236-require_once-function-is-not-working-in-ie/#findComment-887375 Share on other sites More sharing options...
PFMaBiSmAd Posted July 31, 2009 Share Posted July 31, 2009 php code is executed on the web server when the page is requested. It is independent of which browser makes the request. What makes you think your code is not working? What are the symptoms? Quote Link to comment https://forums.phpfreaks.com/topic/168236-require_once-function-is-not-working-in-ie/#findComment-887385 Share on other sites More sharing options...
.josh Posted July 31, 2009 Share Posted July 31, 2009 check for javascript/ajax errors. Quote Link to comment https://forums.phpfreaks.com/topic/168236-require_once-function-is-not-working-in-ie/#findComment-887387 Share on other sites More sharing options...
tomjung09 Posted July 31, 2009 Author Share Posted July 31, 2009 You make a good point PFMaBiSmAd. It looks like it isn't the require once file but the function that is being called that is failing. This is the code I ran on it, the error!!! is never printed. Does that mean that the function get_distance is erroring out? <?php echo "test"; try{ $distance = zipcode_class::get_distance($zip1, $temp); } catch(Exception $e){ echo "error!!!"; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/168236-require_once-function-is-not-working-in-ie/#findComment-887399 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.