0
A
回答
1
让我们来定义你的php转换工具的可能层次。
terminal # user enters commands here, sees output
shell # the terminal automatically starts a shell process
# so users can type commands and get work done
/path/to/your/conversion/tool.php doc1.doc doc1.pdf
# here is the user, accessing your script.
# one solution to conversions is to allow for 1 input and 1 ouput file
# I have done that to keep things simple, your solution may be different
phpcode shell("externalconverter", "doc1.doc","doc1.pdf", "/path/to/tmpWrkSpace"?)
# again, a guess, your php is asking to execute a external command
# and we're passing the arguments
"externalconverter" "doc1.doc" "doc1.pdf" tmp="/path/to/tmpWrkSpace"
# again, a guess
所以,这取决于你或exteranlconverter创建静态的(或者非唯一的)名称的临时文件。 也就是说2个用户使用不同的文件名同时启动程序,是否创建了具有完全相同名称的临时文件?可能不会,但是这种事情发生并且值得提前检查。
为了确认您的安全,请使用2个终端窗口设置测试,提前输入两个命令,使用专门为此测试创建的.doc文件并且无关紧要,同时执行两个命令时间(尽可能快)。你需要一个足够大的文件(或者在任何情况下)来花费很长时间来处理你确定两个文件正在被同时处理。
通常,假设Linux/Unix操作系统,大多数程序允许同时运行多个副本。但测试是你最好的防守。
如果这不能回答您的问题,请考虑使用上述提纲编辑您的问题,向我们展示转换工具中元素的层次结构。 IHD。
IHTH。
相关问题
- 1. 传递文件的shell脚本多次
- 2. 无法访问使用shell脚本
- 3. Shell脚本 - 当shell脚本多次提示时输入重定向
- 4. Shell脚本问题
- 5. Shell脚本问题
- 6. shell脚本问题
- 7. Shell脚本问题
- 8. shell脚本问题
- 9. 访问一个Jar的多个输出在shell脚本
- 10. 访问和更新其他脚本中的shell脚本变量
- 11. 在父脚本中访问由shell脚本返回的值
- 12. sqlplus的访问和使用电子邮件访问shell脚本
- 13. 如何从shell脚本创建和访问shell配置文件?
- 14. shell脚本多行注释
- 15. EOF问题shell脚本
- 16. shell脚本的问题!
- 17. Ubuntu的shell脚本问题
- 18. Shell脚本案例问题
- 19. java的shell脚本问题
- 20. 内存问题:Shell脚本
- 21. Ubuntu Shell脚本问题
- 22. Automator bash shell脚本问题
- 23. 问题reterving在shell脚本
- 24. shell脚本命令疑问
- 25. applescript do shell脚本问题
- 26. 管到shell脚本问题
- 27. Bourne Shell脚本问题
- 28. Shell脚本变量问题
- 29. 句子问题(shell脚本)
- 30. Shell脚本值问题
+1非常好的方法来模糊的问题。 – chepner