In windows explorer their is a summary tab that contains, title, subject, author, category, keywords, and comments for every file. Is it possible to read and edit this data using php?
You can't get meaningful metadata with PHP in windows for many applications. The only real exception for this would be using PHP's Component Object Model.
Reference
http://www.php.net/manual/en/intro.com.php
Here is an example for word / excel:
// for MSExcel use:
$objOfficeApp = new COM("excel.application") or die("unable to instantiate MSExcel");
// for MSWord use:
//$objOfficeApp = new COM("word.application") or die("unable to instantiate MSWord");
$objOfficeApp->Workbooks->Open( "c:\\temp\\test.xls" );
//$objOfficeApp->Documents->Open( "c:\\temp\\test.doc" );
$objDocProps = $objOfficeApp->ActiveWorkBook->BuiltInDocumentProperties();
//$objDocProps = $objOfficeApp->ActiveDocument->BuiltInDocumentProperties();
$count = $objDocProps->count();
while( $objDocProp = $objDocProps->Next() ) {
print $objDocProp->Name() . ': ' . $objDocProp->Value() . "\n";
}
unset($objDocProp);
unset($objDocProps);
$objOfficeApp->ActiveWorkBook->Close();
//$objOfficeApp->ActiveDocument->Close();
$objOfficeApp->Quit();
unset($objOfficeApp);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With