Jump to content

Move_uploaded_file problem


jeeva

Recommended Posts

hi frnds,

 

I have some problem with uploading the file.To upload the file i am using move_uploaded_file function.

 

now wts my poblem is the files are uploading in local system but not in the client server i dont know y?

i have given folder prmission also.

 

here is my code

include "globalvars.php";
chmod("uploads", 777);
$id=$_GET['i'];
$filepath=$_POST['file'];
$result    = move_uploaded_file($_FILES['file']['tmp_name'],"uploads/".$_FILES['file']['name']);
if (!$result) { 
RedirectPage("../viewimage.php?i=$id&err=1");
exit; 

} 

$filename=$_FILES['file']['name']);

$ins=$db->Insert($imageTable,"pid,filename","$id,'$filename'");
RedirectPage("../viewimage.php?i=$id");

Link to comment
https://forums.phpfreaks.com/topic/64013-move_uploaded_file-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.