2015-09-28 44 views
-1

以下代碼可以在本地主機上正常工作,但是當我在服務器 上將其上載時,它不會。來自另一個文件的PHP調用函數

的functions.php

<?php 
    function test($tmp){ 
     return "returned value: " . $tmp; 
    } 
?> 

的config.php

<?php 
    include("functions.php"); 
?> 

的index.php

<?php 
    include("config.php"); 
    echo test("value"); 
?> 

服務器沒有甚至顯示錯誤,但我已啓用它:

ini_set('display_errors',1); 

PHP版本是相同的。

+0

在index.php中包含functions.php – ManiMuthuPandi

+0

section boldding – amdixon

回答

0

你在你的Index.php中包含了Config.php嗎?

而我正在使用它來顯示我的錯誤。

ini_set('display_errors',1); 
ini_set('display_startup_errors',1); 
error_reporting(E_ALL); 
0

我不能在服務器上嘗試。我嘗試在本地主機上,它工作正常。

Try This 

error_reporting(E_ALL); 
ini_set("display_errors", 1); 

OR 

There can be file path not found issue. 
相關問題