Hi ich habe folgende scripte
index.php:
upload.php:
und ich bekomme diese Errors:
Warning: copy() [function.copy]: open_basedir restriction in effect. File(/uploads/skull02.jpg) is not within the allowed path(s): (/home/ace123:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/ace123/public_html/imageup/upload.php on line 44
Warning: copy(/uploads/skull02.jpg) [function.copy]: failed to open stream: Operation not permitted in /home/ace123/public_html/imageup/upload.php on line 44
Upload error.
Was ist da falsch ich stehe total aufm Schlauch.
Demo:
http://images.backyard-source.net
index.php:
PHP:
<form enctype="multipart/form-data" action="upload.php" method="post">
<table border=0><pre>
<tr><td colspan=2 align=center>Choose File:</td></tr>
<tr>
<td align=center><input type="hidden" name="MAX_FILE_SIZE" value="2097152">
<input name="userfile" type="file" size=30></td>
</tr>
<tr>
<td align=center><input name="submit" type=submit value="Upload"></td>
</tr>
</pre></table>
</form>
upload.php:
PHP:
<?php
$DST="/uploads/";
$DST_HTTPD="/uploads/";
echo "<table border=0>";
echo "<tr><td width=100>Name</td><td>".$userfile_name."</td></tr>";
echo "<tr><td >Size</td><td>".$userfile_size." Bytes</td></tr>";
echo "<tr><td >Filetype</td><td>".$userfile_type."</td></tr>";
if ($userfile_type!="image/gif" && $userfile_type!="image/pjpeg" && $userfile_type!="image/jpeg" && $userfile_type!="image/bmp" && $userfile_type!="image/png")
{
echo "<b>Error:</b> This file is no pic.<br><br>";
exit;
}
echo "<tr><td></td><td>";
if (file_exists($DST.$userfile_name))
{
echo "Filename already exists";
} else
{
if (copy($userfile, $DST.$userfile_name))
{
echo "<img src=\"".$DST_HTTPD.$userfile_name."\" border=0>";
} else
{
echo "Upload error.";
}
}
echo "</td>
</tr></table>";
?>
und ich bekomme diese Errors:
Warning: copy() [function.copy]: open_basedir restriction in effect. File(/uploads/skull02.jpg) is not within the allowed path(s): (/home/ace123:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/ace123/public_html/imageup/upload.php on line 44
Warning: copy(/uploads/skull02.jpg) [function.copy]: failed to open stream: Operation not permitted in /home/ace123/public_html/imageup/upload.php on line 44
Upload error.
Was ist da falsch ich stehe total aufm Schlauch.
Demo:
http://images.backyard-source.net