Heim  >  Fragen und Antworten  >  Hauptteil

为什么我用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_u5282803 Tage vor1401

Antworte allen(2)Ich werde antworten

  • 数据分析师

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

    为什么我用hhvm执行以下代码会出现错误,而php5.5却没有这些错误-PHP中文网问答-为什么我用hhvm执行以下代码会出现错误,而php5.5却没有这些错误-PHP中文网问答

    围观一下哦,学习一下。

    Antwort
    0
  • PHP中文网

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

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

    Antwort
    0
  • phpcn_u528

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

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