[英]How do I run a php file inside a phar?
I put in the phar archive the php-file 'test.php' with the code: 我将带有以下代码的php文件“ test.php”放入phar存档中:
<?php
echo 'hello';
?>
How to start the file and display hello on the screen? 如何启动文件并在屏幕上显示问候? With state files, for example txt such works, but with PHP there is no:
对于状态文件,例如txt这样的作品,但是对于PHP没有:
echo file_get_contents('phar://archive.phar/test.php');
请尝试这样require_once('phar://archive.phar/test.php');
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.