You are here: Re: Get a file's version in PHP « PHP Programming Language « IT news, forums, messages
Re: Get a file's version in PHP

Posted by Janwillem Borleffs on 10/30/05 15:15

Marius III wrote:
> No, I need to get the FileVersion.
> For example an EXE files version can be: 2.0.0.260 and a newer
> version of this EXE can be 2.0.0.269.
>

Since you are mentioning EXE files, I assume that you need this for a
Windows environment.

Here, you can use the COM extension (http://www.php.net/com) as follows:

<?php

//create FSO instance
$fso = new COM("Scripting.FileSystemObject")
or die("Could not create Scripting.FileSystemObject");

$version = $fso->GetFileVersion(realpath('some.exe'));
print $version;

?>


JW

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация