为什么我用hhvm执行以下代码会出现错误,而php5.5却没有这些错误
phpcn_u528
phpcn_u528 2017-01-18 22:19:54
0
2
1463

<?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_u528
phpcn_u528

reply all(2)
数据分析师

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.

Ty80

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

  • reply php7速度感觉还是不如hhvm,是吗?
    phpcn_u528 author 2017-01-19 15:13:34
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template