PHP 打开文件?
current.php
是我们在浏览器中打开的页面。
other_1.php
和 other_2.php
是我们要执行的页面。这两页工作量很大,但工作速度很慢。
当我们打开current.php
时,我们怎样才能调用其他页面来工作?
current.php
应该只是打开然后死掉,什么也没有得到,只需发送命令即可打开。
如果当前页面包含其他页面,它将消耗大量内存并超出托管帐户上可用的最大执行时间。
所有页面都放在同一个文件夹中。
有什么想法吗?
谢谢。
current.php
is page which we open in browser.
other_1.php
and other_2.php
are pages, which we want to execute. These two pages do a big job and work slowly.
How can we call both other pages to work, just when we open current.php
?
current.php
should just open and die, nothing get, just send commands to open.
If current page will include other pages, it will eat a lot of memory and go out from the maximum time execution available on hosting-account.
All the pages placed in same folder.
Any idea?
Thanks.
你可以尝试这个:
在 $cmd 中,你将路径传递给 php,然后你就可以像在 CLI 中一样使用该命令。
you can try this one:
In the $cmd you pass the path to php and than you can use the command as in CLI.