dongtie0929 2011-08-19 03:07
浏览 49

PHP显示空白页面[关闭]

I am using Apache on Ubuntu, and every PHP page shows nothing. However, other files, such as images are displayed normally. What should I do?

  • 写回答

1条回答 默认 最新

  • dongpochi9741 2011-08-19 05:22
    关注

    Start by changing the file extension of one of your php files to .php4 or .php5.

    If you still see a blank page you might have errors in your code, to debug insert the following code at the top of your php files:

    error_reporting(E_ALL);  // will report any errors your code may have
    ini_set("display_errors", 1); // will display those errors
    

    Still seeing a blank page ? If you're on shared hosting please ignore the following step and report the problem to your hosting provider.

    It's possible that php isn't installed correctly with Apache, to install it on Ubuntu run:

    sudo apt-get install php5
    sudo apt-get install libapache2-mod-php5
    sudo /etc/init.d/apache2 restart
    

    Please Let me know if it worked.

    评论

报告相同问题?

悬赏问题

  • ¥15 关于#网络安全#的问题:求ensp的网络安全,不要步骤要完成版文件
  • ¥15 可否在不同线程中调用封装数据库操作的类
  • ¥20 使用Photon PUN2解决游戏得分同步的问题
  • ¥15 微带串馈天线阵列每个阵元宽度计算
  • ¥15 keil的map文件中Image component sizes各项意思
  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 Centos / PETGEM