Grafische gevorderde |
|
Ok dan ben ik nu zover, alleen nu werken alle functies en hij is wel goed gechmod:S wat is er fout aan deze functie:
<?php
function noValidation() {
$temp_file_name = trim($this->temp_file_name);
$file_name = trim(strtolower($this->file_name));
$upload_dir = $this->getUploadDir();
$upload_log_dir = $this->getUploadLogDir();
$file_size = $this->getFileSize();
$ip = trim($_SERVER['REMOTE_ADDR']);
$cpu = gethostbyaddr($ip);
$m = date("m");
$d = date("d");
$y = date("Y");
$date = date("m/d/Y");
$time = date("H:i:s");
if($upload_dir == false || $upload_log_dir == false) {
return false;
} else {
if(is_uploaded_file($temp_file_name)) {
if(move_uploaded_file($temp_file_name, $upload_dir . $file_name)) {
$log = $upload_log_dir . $y . "_" . $m . "_" . $d . ".txt";
$fp = fopen($log, "a+");
fwrite($fp, $ip . "-" . $cpu . "|" . $file_name . "|" . $file_size . "|" . $date . "|" . $time);
fclose($fp);
return true;
} else {
return false;
}
} else {
return false;
}
}
}
?>
<?php function noValidation() { $temp_file_name = trim($this->temp_file_name); $upload_dir = $this->getUploadDir(); $upload_log_dir = $this->getUploadLogDir(); $file_size = $this->getFileSize(); $ip = trim($_SERVER['REMOTE_ADDR']); if($upload_dir == false || $upload_log_dir == false) { return false; } else { $log = $upload_log_dir . $y . "_" . $m . "_" . $d . ".txt"; fwrite($fp, $ip . "-" . $cpu . "|" . $file_name . "|" . $file_size . "|" . $date . "|" . $time); return true; } else { return false; } } else { return false; } } } ?>
|