0
$filecount = count(glob("images/profile/" . $db->getUserID($_SESSION['username']) . "*.png"));
該文件夾現在應該PHP包括變量filecount
圖片/資料/ 1
$db->getUserID($_SESSION['username']);
返回1所以好像我有問題,包括變量到文件路徑。 它存在,裏面有一張名爲avatar.png的圖片。所以filecount應該是1.我有一個
if($filecount == 1)
{
echo "Test"
}
else
{
echo "Test2"
}
但它總是回聲測試2,而不是測試。
有時候它很容易和你只是盲目... 非常感謝你! – loomie 2013-03-09 19:07:18