php
環境:apache,php用的是蘋果內建的
項目是放在預設DocumentRoot: "/Library/WebServer/Documents"下面
建立的VirtualHost 的DocumentRoot: "/Library/WebServer/Documents/myProject/public"
在public目錄下有index.phtml檔案
cat public/index.php
/**
- This makes our life easier when dealing with paths. Everything is relative
- to the application root now. */
chdir(dirname(__DIR__));
// Decline static file requests back to the PHP built-in webserver
if (php_sapi_name() === 'cli-server' && is_file(__DIR__ . parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH))) {
return false;
}
// Setup autoloading
require 'init_autoloader.php';
// Run the application!
Zend\Mvc\Application::init(require 'config/application.config.php')->run();
開啟網頁後,顯示空白,錯誤資訊是
[Error] Failed to load resource: the server responded with a status of 500 (Internal Server Error)
然後我在index.php裡面添加了一句phpinfo(),然後頁面顯示了phpinfo的頁面
以上我的情況和問題就是這樣,請教各位大神幫我看看問題是出在哪裡了!多謝!!
補充:查看了/var/log/apache2/erro_log
顯示錯誤為AsseticWriter : Unable to create a directory