Forum Moderators: coopster
I am reading excel files for our internal apps server.
Having changed from coexisting module in apache and script interpreter I have noticed fread stops before I expected.
The code works if I add the apptype directive to apache http.conf, kind of
...
AddHandler php-script .php .php4
Action php3-script /php/php.exe
...
I think fread finds an 1a in the excel fiel, so it justs stops having read 8 bytes instead of 30.000
Is there any workaround to this problem?
(The function file_get_contents() is unavailable for my server at this moment. )
thanx
I found out for me and I help myself...
As php use cases say for fread in [es2.php.net...] ,
If you use:
fopen($file, "rb")
You can securely read files under win32
With fopen($file, "r") you face the risk of finding an
1A and finishing prematurely the read process
-This is meant for weird ascii files not the average text file-