$cmd = "pdfinfo"; // Linux
exec ( "$cmd \"$uploaddir_path.$list_files_upload[$list_files_upload_count] \"", $output );
// Iterate through lines
//$pagecount [$list_files_upload_count]= 0;
foreach ( $output as $op ) {
// Extract the number
if (preg_match ( "/Pages:\s*(\d+)/i", $op, $matches ) === 1) {
$pagecount [$list_files_upload_count] = intval ( $matches [1] );
break;
}
}
答案 0 :(得分:0)