2013-05-06 39 views
0

我從sourceforge.net下載了一個名爲Employee Scheduler的php項目。事情是,index.php應該是主頁,但是當我通過localhost訪問它時沒有顯示。當我訪問計算機時,其他的php項目在我的計算機上工作,除此員工調度程序外。我敢肯定,我訪問正確的文件夾也一樣,訪問它在php項目的索引頁未顯示任何內容

本地主機/調度/ index.php文件

,甚至創造在同一目錄測試php文件和訪問它。測試PHP文件的作品和index.php仍然沒有顯示任何內容。這裏可能是什麼問題?

我在Windows 7計算機上使用WAMP。

編輯:

我已經包括error_reporting(E_ALL);在php文件的第一行,但它仍然沒有做任何輸出。是什麼賦予了?

我會在這裏發表的index.php的內容:

<?php 
/********************************************************* 
    File: index.php 
    Project: Employee Scheduler 
    Author: John Finlay 
    Comments: 
     The home page for the site. Asks a user to login 
     and then redirects them to the appropriate section 
     for employees or supervisors 

    For site documentation and setup see the README.txt file 
    included with the distrobution package. If you did not 
    receive this file, it can be found at 
    http://empscheduler.sourceforge.net 

    Copyright (C) 2003 Brigham Young University 

    This program is free software; you can redistribute it and/or modify 
    it under the terms of the GNU General Public License as published by 
    the Free Software Foundation; either version 2 of the License, or 
    (at your option) any later version. 

    This program is distributed in the hope that it will be useful, 
    but WITHOUT ANY WARRANTY; without even the implied warranty of 
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
    GNU General Public License for more details. 

    You should have received a copy of the GNU General Public License 
    along with this program; if not, write to the Free Software 
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
**********************************************************/ 

error_reporting(E_ALL); 
require "es_functions.php"; 

//-- authenticate the user 
$user = auth_user(); 
$url = ""; 
//-- if they are a supervisor then forward them to the supervisor home page 
if (preg_match("/(Supervisor)|(Admin)/", $user["u_type"])) $url= "es_sup_index.php?".session_name()."=".session_id(); 
//-- forward to employee homepage 
else $url = "es_emp_index.php?".session_name()."=".session_id(); 
header("Location: $url"); 

print_header("Welcome"); 
print_r($user); 
print "<br /><br />If you are seeing this, your browser did not forward you to the correct page. Click <a href=\"$url\">here</a> to continue.<br />\n"; 
print_footer(); 
exit; 
?> 
+0

您有錯誤報告嗎?服務器日誌中是否有任何內容? – andrewsi 2013-05-06 16:34:30

+0

index.php有一個錯誤,導致它不顯示任何內容,並且應用程序關閉了錯誤報告,所以什麼也沒有顯示 – raidenace 2013-05-06 16:38:35

+1

在'<?php','error_reporting(E_ALL)'然後運行頁面後的第一行添加並在這裏把錯誤 – Cooper 2013-05-06 16:40:14

回答

1

嘗試添加以下行使用error_reporting(E_ALL)之後;

ini_set("display_errors", 1); 
+0

什麼都沒有.. – Gannicus 2013-05-06 17:24:13

+0

只是一個更新,我使用的是Windows,正如我發現的那樣,這個我正在問的PHP項目需要LDAP。由於我還沒有想出如何在Windows上安裝LDAP,我只是使用Ubuntu來打開項目和tada,它正在工作。 – Gannicus 2013-05-15 07:29:27

+0

接受答案,因爲這是我在上面給出的細節的唯一可能的行動方案。 – Gannicus 2013-05-15 07:30:09