kusarigama
Technical User
Hi all,
I've a problem with the following. When I hit the upload button I get a error message from the script which says:
UNABLE TO CREATE '/pictures/': Is a directory ...
this directory already exists - I didn't tell the script that it should create a directory ...
Here is the code:
HTML STUFF ...
<form name="uploader" method="post" action="<?print($PHP_SELF);?>" enctype="multipart/form-data">
<?
$updir = "/pictures/";
$good = "<font face=verdana size=2 color=green><b>History/Turniere wurde aktualisiert !</b></font>";
$bad = "<font face=verdana size=2 color=red><b>Upload Fehler !</b></font>";
$empty = "<font face=verdana size=2 color=red><b> Wählen Sie eine Datei aus </b></font>";
if(isset($upload)) // name of submit button
{
$checker = copy($_FILES['userfile']['tmp_name'],$updir);
print $checker ? $good : $bad;
if(empty($_FILES['userfile']['name']))
{
print $empty;
}
}
?>
HTML STUFF
<input type="file" name="userfile">
Thanx in advance
Olli
I've a problem with the following. When I hit the upload button I get a error message from the script which says:
UNABLE TO CREATE '/pictures/': Is a directory ...
this directory already exists - I didn't tell the script that it should create a directory ...
Here is the code:
HTML STUFF ...
<form name="uploader" method="post" action="<?print($PHP_SELF);?>" enctype="multipart/form-data">
<?
$updir = "/pictures/";
$good = "<font face=verdana size=2 color=green><b>History/Turniere wurde aktualisiert !</b></font>";
$bad = "<font face=verdana size=2 color=red><b>Upload Fehler !</b></font>";
$empty = "<font face=verdana size=2 color=red><b> Wählen Sie eine Datei aus </b></font>";
if(isset($upload)) // name of submit button
{
$checker = copy($_FILES['userfile']['tmp_name'],$updir);
print $checker ? $good : $bad;
if(empty($_FILES['userfile']['name']))
{
print $empty;
}
}
?>
HTML STUFF
<input type="file" name="userfile">
Thanx in advance
Olli