Re[2]: [PHP-DB] phptotext]

From: Date: Tue, 20 Sep 2005 01:37:26 +0000
Subject: Re[2]: [PHP-DB] phptotext]
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-40312@lists.php.net to get a copy of this message
Yui wrote: > $handle = popen("/usr/bin/pdftotext \"$original_name\" - -layout > ",'r'); > $read = fread($handle, 2048000); > echo $read; > pclose($handle); > But I can not see anything!! > Please do help me! $tmpfile = '/home/domain/public_html/pdf_files/myfile.pdf'; chmod ($tmpfile, 0777); $salida = shell_exec("pdftotext /home/domain/public_html/pdf_files/$tmpfile 2>&1"); Here we assume pdftotext.exe is inside /home/domain/public_html/pdf_files/ Maybe you have this inside /usr/bin... etc. In this case be aware of the security restrictions in your server when you try to execute a program outside your secure environment. If you have these problems then you can put the executable in the same file's folder. No fear. It works. Also, you can translate the pdftotext error codes or messages to japanese ^_^ if (ereg('some words in the console answer', $salida)) { print 'my message in jp'; } etc..

« previous php.db (#40312) next »