note 56740 added to function.exec
| From: | mbirthatwebwriters dot de at osu1 dot php dot net | Date: | Wed, 14 Sep 2005 06:42:29 +0000 |
| Subject: | note 56740 added to function.exec | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-95140@lists.php.net to get a copy of this message | ||
I had to combine many PDFs into a single one using pdftk and did this by writing the commands into a
batch file and running it with exec('cmd /c blabla.cmd').
Using batch files under Windows, there's a line-length-limit of 1024 characters. So I made sure
each line in the batch file doesn't exceed 1024 characters.
I now switched over to using exec('start /b ...') directly with the desired command
(instead of writing it into a batch file and calling that) and played around with the line-length.
Seems like the exec() command works with command-strings of up to 4096 characters in length. If the
string is longer, it won't be executed.
----
Manual Page -- http://www.php.net/manual/en/function.exec.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+56740
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+56740&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+56740&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+56740&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+56740&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+56740&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+56740&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+56740&report=yes
Search -- http://master.php.net/manage/user-notes.php