開啟php專案網站,頁面顯示為空白

來源:互聯網
上載者:User
關鍵字 php
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

  • 相關文章

    聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.