简体   繁体   中英

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
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:

echo file_get_contents('phar://archive.phar/test.php');

请尝试这样require_once('phar://archive.phar/test.php');

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM