Home >Backend Development >PHP Tutorial >PHP有没有java里类似-cp的功能?

PHP有没有java里类似-cp的功能?

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-06 20:11:431087browse

在java里,可以通过-cp指定类库,比如我要运行example.zip里的TheClass

java -cp example.zip TheClass

PHP里有没有类似功能?


我的最终目标是用Java的ProcessBuilder跑在zip文件里的php文件,
更多信息请点击
https://segmentfault.com/q/1010000004946...

回复内容:

在java里,可以通过-cp指定类库,比如我要运行example.zip里的TheClass

java -cp example.zip TheClass

PHP里有没有类似功能?


我的最终目标是用Java的ProcessBuilder跑在zip文件里的php文件,
更多信息请点击
https://segmentfault.com/q/1010000004946...

<code>$phar2 = new Phar('/yourpath/test.phar');
include('phar://test.phar/subdir/test2.php');
test2();
include('phar://test.phar');
test1();</code>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn