Re: Get a file's version in PHP
- From: "Janwillem Borleffs" <jw@xxxxxxxxxxxxx>
- Date: Sun, 30 Oct 2005 14:15:01 +0100
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
.
- Follow-Ups:
- Re: Get a file's version in PHP
- From: Peter van Schie
- Re: Get a file's version in PHP
- References:
- Re: Get a file's version in PHP
- From: Janwillem Borleffs
- Re: Get a file's version in PHP
- From: Marius III
- Re: Get a file's version in PHP
- Prev by Date: Re: Get a file's version in PHP
- Next by Date: Re: Get a file's version in PHP
- Previous by thread: Re: Get a file's version in PHP
- Next by thread: Re: Get a file's version in PHP
- Index(es):