Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
所以,这是我的简单代码:
<?php for ($i = 0; $i < 2; $i++) { exec('php -q file.php ' . $i . ' > /dev/null &'); echo 'Pros launched... ' . $i . '<br />'; } ?>
问题在于,每次我运行此代码时,它主要使用 100% 的服务器资源并使服务器停机......而这导致使用 argv[1] == 0 ($i = = 0)...
有任何想法吗?