0

I discovered that my upload form seems to work in all common browsers, including Firefox, Chrome and IE8.

But when it comes to IE9 it fails.

Btw, the form is in a PHP file.

This is what the file looked like:

<? 
require_once ($_SERVER["DOCUMENT_ROOT"].'/_meta/phpFunctionsLibrary.php');
echo '--- HTML Code including the form element ---'
?>

Then I deleted the "require_once" line, and suddenly it worked in IE9 also.

Fortunately, in this case the Library is dispensable to a certain extent, but of course I can't rely on that.

So I need to know what could have caused this mess in IE9...

xampper
  • 91
  • 7
  • Hmm, i never encounter problems with php function in cross browsing, have you checked your form upload? Please see this [IE season 9](http://stackoverflow.com/questions/15598963/why-does-my-form-not-upload-files-in-internet-explorer-9) :)) – Drixson Oseña Oct 14 '13 at 22:45
  • Agreed with everyone... something in your library file is generating some form of output which is conflicting. Without output the file wouldn't affect the browser – Joao Oct 14 '13 at 22:53

3 Answers3

1

From a similar stackoverflow post PHP/HTML/CSS: IE acting weird when using require_once() - there might be space at the end of the library file after closing ?>... try removing that space or get rid of the closing '?>' tag which is optional.

Community
  • 1
  • 1
waka-waka-waka
  • 1,025
  • 3
  • 14
  • 30
0

The PHP is rendered on the server, so the same document is being sent regardless of the browser. I would check to see if any php is accidently being output or echoed, maybe messing up the HTML causing it to be handled incorrectly in IE

Ian Walker-Sperber
  • 3,661
  • 2
  • 14
  • 18
  • Okay, I've got the solution: The PHP file containing the form is UTF-8 encoded, and the included "phpFunctionsLibrary.php" was UTF-8 encoded, too. I changed only the latter one to ANSI, then it worked in IE9. To me, this is weird, but perhaps somebody has an explanation for this. As long as the included file was UTF-8 IE9 - and only IE9 - refused to exexute the upload, even when I deleted everything in the included file, making it empty. – xampper Oct 16 '13 at 20:32
0

Okay, I've got the solution: The PHP file containing the form is UTF-8 encoded, and the included "phpFunctionsLibrary.php" was UTF-8 encoded, too. I changed only the latter one to ANSI, then it worked in IE9.

To me, this is weird, but perhaps somebody has an explanation for this. As long as the included file was UTF-8 IE9 - and only IE9 - refused to exexute the upload, even when I deleted everything in the included file, making it empty.

xampper
  • 91
  • 7