<?php
/**
* Created by PhpStorm.
* User: 24965
* Date: 2017/1/16
* Time: 20:18
*/
$data=$_GET["data"];
$user=$_SERVER['REMOTE_ADDR'];
$file_name=$user.".php";
if(file_exists('php_file/'.$file_name))
{
$php_file=fopen("php_file/".$file_name,"w") or die("no access authority");
fwrite($php_file,$data);
fclose($php_file);
}
else
{
$php_file=fopen("php_file/".$file_name,"wb") or die("no access authority");
fwrite($php_file,$data);
fclose($php_file);
}
$result_file=fopen("result_file/".$user.".txt","w") or die("no access authority");
$shell ="php php_file/$file_name >>"."result_file/$user.txt";
system($shell); //编译php文件
echo "<script>
document.getElementById('text').value=$result;
</script>";
在hhvm上会出现“Failed to initialize central HHBC repository: Failed to open /var/www/.hhvm.hhbc: 14 - unable to open database file”的错误,我想问一下这是为什么,需要如何修改呢
Why do I get errors when I use hhvm to execute the following code, but php5.5 does not have these errors-PHP Chinese Q&A-Why do I get errors when I use hhvm to execute the following code, but php5.5 does not have these errors-PHP Chinese Online Q&A
Take a look around and learn.
这虚拟机维护成本太高,用的人也不会太多,建议升级到php7性能更好,望采纳。