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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值