Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/262.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
php exec不使用pdfinfo_Php_Exec - Fatal编程技术网

php exec不使用pdfinfo

php exec不使用pdfinfo,php,exec,Php,Exec,如果您是在linux平板上运行,请使用表单 $cmd = "pdfinfo"; // Linux exec ( "$cmd \"$uploaddir_path.$list_files_upload[$list_files_upload_count] \"", $output ); // Iterate through lines //$pagecount [$list_files_upload_count]= 0; for

如果您是在linux平板上运行,请使用表单

$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;
            }
        }
exec()

exec()
用于Windows,而
shell\u exec()
用于Linux平台


@divya您能告诉我您的操作系统板表单吗?还要确保。。命令执行(shell执行)模块从你的Apache设置中启用。ubuntu..如何在ubuntu中检查Apache设置这可能对你有帮助,请给我发送$uploaddir\U path的值。$list\U files\U upload[$list\U files\U upload\U count]$cmd=“pdfinfo/home/ankit/demo.pdf”;变量转储(shell_exec($cmd));这在ubuntu 14.05上对我很有效
shell_exec()