file upload - move_uploaded_file php function is not working -


i know similar questions answered many times in site. google , search many forum bt can't solve problem.

move_uploaded_file function not working, function cannot upload file due appropriate path.

here code

$targetpath = "/home/abc/public_html/uploads/";          let website abc.com          move_uploaded_file($_files['filedata']['tmp_name'],$targetpath.$_files['filedata']['name']); 
  • i have upload file in /public_html/uploads/downloads
  • move_uploaded_file function in /public_html/assets/uploadify
  • input form in /public_html/application/modules/downloads/views/admin location

note: code working fine in localhost

can suggest path

plz dnt mark dublicate

assuming upload file in public_html directory, change $targetpath /uploads/ , change

move_uploaded_file($_files['filedata']['tmp_name'],"$targetpath".$_files['filedata']['name']); 

this worked me.


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -