Hey all,
I have a prob whit my upload system.
Im sure I cmod the dir: fotos to 777
But I still get this error:
Warning: Unable to open F:\fotos\vamp40.gif in /www/htdocs/goldchat/ourchatters/aanmelden.php on line 48
The extencion is not suported.
Please press the back button and change picture
This is the script(line 48 checked whit a comment //:
function fcheck($file) {
if (!($file == "none") && !($file == "")) {
validate($file,$nickname);
}
echo "<font color=black size=2>Banner check:</font> <font color=navy size=2>ok</font><br>";
}
function getext($file) {
$tmp = array(
"1"=>"gif",
"2"=>"jpg",
"3"=>"png");
$blaat = getimagesize($file);
RETURN ($tmp[$blaat[2]]);
}
function validate($file,$nickname) {
$size = getimagesize($file,&amp;amp;$info); // line 48
// first check, extension
if ($size[2] == "1") {
$ext = "gif";
} elseif ($size[2] == "2") {
$ext = "jpg";
} elseif ($size[2] == "3") {
$ext = "png";
} else {
echo "<font color=black size=2>De extencie van de foto word niet ondersteunt.
<br>Druk op de back button van de brower en upload een andere foto (gif, jpg of png)</font>";
exit();
}
// if succeeded, check width
$sizes = "700*700";
$sizes = explode("*", $type);
if (!($size[0] <= $sizes[0]) || !($size[1] <= $sizes[1])) {
echo "De foto ($size[0]*$size[1]) is te groot ($type)";
exit();
}
echo "<font color=black size=2>Foto ok</font><br>";
upload($file,$nickname,$ext);
}
function upload($file,$nickname,$ext) {
$path = "/www/htdocs/goldchat/ourchatters/fotos/";
$tmp = "$path"."$nickname.$ext";
if (!copy($file,$tmp)) {
echo "upload failed";
exit();
}
echo "<font color=black size=2>Foto uploaded:</font><br>";
}
fcheck($file);