Новости | Документация | Download | Webboard | FAQ | Поиск | Контакты


Basic usage

This example will open an RPM file and read the name, version, and release from the RPM file, echo the results, and close the RPM file.

Пример #1 Basic RPMReader Example

<?php

$filename 
"/path/to/file.rpm";

// open file
$rpmr rpm_open($filename);

// get "Name" tag
$name rpm_get_tag($rpmrRPMREADER_NAME);

// get "Version" tag
$ver rpm_get_tag($rpmrRPMREADER_VERSION);

// get "Release" tag
$rel rpm_get_tag($rpmrRPMREADER_RELEASE);

echo 
"$name-$ver-$rel<br>\n";

// close file
rpm_close($rpmr);

?>





  Copyright Apache.ru © 1999-2017, All Rights Reserved Разработка сайта: Inside.ru  
  РЕКЛАМА НА САЙТЕ: |