我的代码中错过了什么? 我试图爆炸/拆分方法,但结果是空数组。 这是我的代码:
function fileName($id){
$result = mysql_query("SELECT * FROM folders WHERE folder_id = ".$id."");
$row = mysql_fetch_array($result);
if($row['parent'] != 0){
echo $row['folder_name']."_";
fileName($row['parent']);
}else{
echo $row['folder_name'];
}
}
if(isset($_POST['upload'])){
$count = $_FILES['files']['name'];
$N = count($count);
$nama = fileName($_POST['folders']);
$ex = split("\_", $nama);
echo "<p>";
var_dump($ex);
}
结果:
Jack_Doyou_Uploaded
array(1) { [0]=> string(0) "" }