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