PHP Classes

Proposal for improvement

Recommend this page to a friend!

      PHP Detect File Type  >  All threads  >  Proposal for improvement  >  (Un) Subscribe thread alerts  
Subject:Proposal for improvement
Summary:Use the external "file" command if file type is not recognized
Messages:3
Author:Christian Vigh
Date:2016-07-15 12:07:04
 

  1. Proposal for improvement   Reply   Report abuse  
Picture of Christian Vigh Christian Vigh - 2016-07-15 12:07:04
Hi,

I would like to suggest a proposal for improvement :
How about using the external Unix "file" command to detect the file type, if it has not been recognized by your class ?

Of course, a boolean parameter in the constructor could say "yes, I want to use the external 'file' command if the file type cannot be determined".

Windows users of course, should have the cygwin package installed for ths solution to work ; if not available then your class could return an "unrecognized" file type.

What do you think about this ?

  2. Re: Proposal for improvement   Reply   Report abuse  
Picture of Martin Latter Martin Latter - 2016-07-15 18:53:22 - In reply to message 1 from Christian Vigh
Hello Christian,

Thank you for your comments about my class.

Yes, I think your suggestions are good and helpful.

I will have a look at this, and will credit you for the inspiration on changes implemented.

Please give me a little while to investigate this.

Cheers,
Martin Latter

  3. Re: Proposal for improvement   Reply   Report abuse  
Picture of Christian Vigh Christian Vigh - 2016-07-15 19:12:24 - In reply to message 2 from Martin Latter
Hello Martin,

don't worry, take your time, I know what it costs to do such things on your free time...

My proposal is to be considered as a "nice to have", not as a "must have".

Anyway, when you'll have time to implement this and should you need any help (for testing for example), please feel free to contact me.

With kind regards,
Christian.