KaiKiller Posted November 2, 2012 Share Posted November 2, 2012 <html> <head> <link rel="stylesheet" href="_admin-style.css" /> </head> <body> <?php include 'host_connect.php'; $server = 'temp'; $temporal = $_FILES['imagen']['tmp_name']; $image_name = $_FILES['imagen']['name']; $folder = $server.'/'.$image_name; move_uploaded_file($temporal,$folder); $desc = $_POST['descripcion']; $link = $_POST['link']; $sql = "INSERT INTO datos (ruta,descripcion,link) values('".folder."','".$desc."','".$link."')"; $res = mysql_query($sql); if ($res) { ?> <div class="user"> <input type='button' value='Volver al panel' onclick='window.location="user_panel.php"' style="margin-left:400px;" /> <p style="margin-left:400px;">Imagen guardada y recibida correctamente.</p> </div> <?php } else { ?> <div class="user"> <input type='button' value='Volver al panel' onclick='window.location="user_panel.php"' style="margin-left:400px;" /> <p style="margin-left:400px;">No se puede guardar la imagen.</p> </div> <?php } ?> </body> </html> Link to comment https://forums.phpfreaks.com/topic/270215-move_uploaded_file-unable-to-move-file/ Share on other sites More sharing options...
ManiacDan Posted November 2, 2012 Share Posted November 2, 2012 And your error messages are...? Link to comment https://forums.phpfreaks.com/topic/270215-move_uploaded_file-unable-to-move-file/#findComment-1389688 Share on other sites More sharing options...
KaiKiller Posted November 2, 2012 Author Share Posted November 2, 2012 The title. the function move_uploaded_file() is unable to move file from the tmp folder in my wamp server to the temp folder i have in the web i'm doing in my local host. Link to comment https://forums.phpfreaks.com/topic/270215-move_uploaded_file-unable-to-move-file/#findComment-1389691 Share on other sites More sharing options...
ManiacDan Posted November 2, 2012 Share Posted November 2, 2012 I'm going to try one more time: Copy and paste the actual error. Do not paraphrase. Do not summarize. The computer is telling you there is a problem, tell us what the computer is telling you if you don't understand. Link to comment https://forums.phpfreaks.com/topic/270215-move_uploaded_file-unable-to-move-file/#findComment-1389695 Share on other sites More sharing options...
Mancent Posted November 3, 2012 Share Posted November 3, 2012 It may be in your php.ini file, you might need to set it to upload_max_filesize = 1024mb post_max_size = 1024mb that might be why the file is not showing up in the new location. is it showing up in the temp folder? Link to comment https://forums.phpfreaks.com/topic/270215-move_uploaded_file-unable-to-move-file/#findComment-1389844 Share on other sites More sharing options...
Mancent Posted November 3, 2012 Share Posted November 3, 2012 Im trying to understand what he is saying, is he saying, he is on his localhost pc, localhost server trying to move it to some other server host? Link to comment https://forums.phpfreaks.com/topic/270215-move_uploaded_file-unable-to-move-file/#findComment-1389845 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.