I want to package the index. php file into a phar file. The file organization is as follows: index. php and 1. php are in the same directory. There is only one helloworld in index. php, and the code in 1. php is like this: {code...}. The running result returns an error: Why? $...
I want to package the index. php file into a phar file:
The file organization is as follows:
Index. php and 1. php are in the same directory.
There is only one hello world in index. php.
The code in 1.php is as follows:
buildFromDirectory(dirname(__FILE__) . '/index.php');$phar->setStub($phar->createDefaultStub('1.php', '1.php'));$phar->compressFiles(Phar::GZ);
The following error is returned:
Why is it wrong?
$ Phar-> setStub ($ phar-> createdefastustub ('1. php', '1. php'); is the parameter incorrect?
What is this stub?
This 1. Can php be run directly or by using the php Command Line?
How can this problem be solved?
Reply content:
I want to package the index. php file into a phar file:
The file organization is as follows:
Index. php and 1. php are in the same directory.
There is only one hello world in index. php.
The code in 1.php is as follows:
buildFromDirectory(dirname(__FILE__) . '/index.php');$phar->setStub($phar->createDefaultStub('1.php', '1.php'));$phar->compressFiles(Phar::GZ);
The following error is returned:
Why is it wrong?
$ Phar-> setStub ($ phar-> createdefastustub ('1. php', '1. php'); is the parameter incorrect?
What is this stub?
This 1. Can php be run directly or by using the php Command Line?
How can this problem be solved?