search

Home  >  Q&A  >  body text

为什么我用hhvm执行以下代码会出现错误,而php5.5却没有这些错误

<?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”的错误,我想问一下这是为什么,需要如何修改呢


phpcn_u528phpcn_u5282899 days ago1461

reply all(2)I'll reply

  • 数据分析师

    数据分析师2017-09-30 23:57:48

    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.

    reply
    0
  • PHP中文网

    PHP中文网2017-01-19 09:07:29

    这虚拟机维护成本太高,用的人也不会太多,建议升级到php7性能更好,望采纳。

    reply
    0
  • phpcn_u528

    php7速度感觉还是不如hhvm,是吗?

    phpcn_u528 · 2017-01-19 15:13:34
  • Cancelreply