ich versuche gerade ein simples Script zu machen,bei dem der User ein Avatar auswählen kann und die dann hochgeladen wird.
ist aber bisher noch nix geworden...
Code: Alles auswählen
//
// Copy Local avatar to server
//
//
// Select Destination
//
$sql = "SELECT config_value
FROM " . CONFIG_TABLE . "
WHERE config_name = 'avatar_path'";
$result = mysql_query($sql);
while ( $row = $db->sql_fetchrow($result) )
{
$avatarpath = $row['config_value'];
}
//
// Copy file
//
$file = $HTTP_POST_VARS['uploadlocal'];
move_uploaded_file('$file', '$avatarpath');
echo "copy('$file', '$avatarpath')";
echo "move_uploaded_file('$file', '$avatarpath')";