2013-05-08 41 views

回答

0

不,目前沒有辦法做到這一點。我很喜歡從你那裏得到一個拉請求:)

+1

這仍然是這種情況嗎? http://docs.hhvm.com/manual/en/ini.core.php – eatonphil 2015-03-17 17:47:09

0

支持auto_prepend_fileauto_append_file被添加到HHVM 3.1.0(2014年發佈)。這些行爲與Zend PHP相同。

如果運行較舊的HHVM版本,那麼(現在仍然是)request_init_document設置與auto_prepend_file類似,因爲它在執行此請求的主腳本之前執行。

但是,它有兩個重要的區別:

  1. 的RequestInitDocument不會每一個web請求之前運行一次。相反,HHVM僅運行request_init_document一次壽命更長的線程。完成的request_init_document之後的虛擬機的狀態在快照中捕獲,然後在多個未來請求開始時恢復,直到它被回收並重新創建。 HHVM 3.22.0 - Server Flow Documentation
  2. 它僅適用於Web請求,而不適用於CLI。 https://github.com/facebook/hhvm/issues/1323