I have a page that uploads files then redirects the user to another page after the files upload, everything works fine in every browser except Internet Explorer. Does anyone have any idea why? Here is part of the code:
The URL being displayed is the page that contains the code I’ve included in the original post.
Here’s how it works, a user visits /upload/index.php they upload files and it sends them to /detail/index.php –> the redirect to details is when the white page happens and the URL displays /upload/inc/assets/process.php –> this is the page in which I’ve included the above code so I’m assuming something on this page is breaking in IE.
but it looks like you just need to do some basic debugging.
this is what I nomally do in situations like this.
start at the top of the script as specified in your form’s action attribute and add
echo 'got here'; die();
run your form to check if it gets to your php script
then move the above echo/die down, line by line if you have to, and add appropriate echo statements to display values of variables and then run the form again each time you move the echos.
as part of 3) insert the echos in each part of conditional blocks (IF blocks) to check your code logic is correct
keep doing this until your echos show something is not right. then back track your code to fix the error.
keep repeating 3) and 4) until you get to the end of your script and it works ok.
if you have a debugger, then debugguing will be easier as you can set break points and check values of variables which is essentially what the above steps are doing.
Thanks for the help. I was able to find 1 line that is causing the problem… When I place echo ‘got here’; die(); before
$uploader->upload($new_file, $upload_dir);
it displays “got here”, when I place it after that line it breaks.
However, I don’t see anything wrong with that line. Any ideas on what would cause it to break and only in Internet Explorer? It still seems to be working fine in FireFox.