0
我有這個http://pastie.org/836744腳本,其中工程類的外部完全沒問題,但它並沒有其他類的內部工作,我已經加入法的全局變量太多,這是被用於其他功能,但沒有奏效。PHP類不另一個類的內部工作,但工作以外的全球
以下是演示代碼
include_once("prayer_calculation.inc.php");
$prayers = get_prayer_times(67.0181732, 30.2094593, 5, 3, 22, 2, 2010, 0, 1678, 1010, 10);
echo $prayers['0']->hour.' '.(($prayers['0']->hour <= 12) ? $prayers['0']->hour : ($prayers['0']->hour - 12)).':'.sprintf("%02d", $prayers['0']->minute).' '.(($prayers['0']->hour < 12) ? 'am' : 'pm');
echo '<br>';
echo (($prayers['1']->hour <= 12) ? $prayers['1']->hour : ($prayers['1']->hour - 12)).':'.sprintf("%02d", $prayers['1']->minute).' '.(($prayers['1']->hour < 12) ? 'am' : 'pm');
echo '<br>';
echo (($prayers['2']->hour <= 12) ? $prayers['2']->hour : ($prayers['2']->hour - 12)).':'.sprintf("%02d", $prayers['2']->minute).' '.(($prayers['2']->hour < 12) ? 'am' : 'pm');
echo '<br>';
echo (($prayers['3']->hour <= 12) ? $prayers['3']->hour : ($prayers['3']->hour - 12)).':'.sprintf("%02d", $prayers['3']->minute).' '.(($prayers['3']->hour < 12) ? 'am' : 'pm');
echo '<br>';
echo (($prayers['4']->hour <= 12) ? $prayers['4']->hour : ($prayers['4']->hour - 12)).':'.sprintf("%02d", $prayers['4']->minute).' '.(($prayers['4']->hour < 12) ? 'am' : 'pm');
echo '<br>';
echo (($prayers['5']->hour <= 12) ? $prayers['5']->hour : ($prayers['5']->hour - 12)).':'.sprintf("%02d", $prayers['5']->minute).' '.(($prayers['5']->hour < 12) ? 'am' : 'pm');
什麼不起作用?什麼'get_prayer_times'返回?你會得到什麼錯誤信息? – thetaiko 2010-02-22 14:22:53
你的愛人鏈接已經死了。也許你可以更新這個問題? – Kev 2011-09-10 15:46:09