Question
How to move uploaded files to permanent directory?

Answers

PHP stores uploaded files in a temporary directory with temporary file names. You must move uploaded files to a permanent directory, if you want to keep them permanently.
PHP offers the move_uploaded_file() to help you moving uploaded files. The example script, processing_ uploaded_files.php, below shows a good example:
$file = 'pickzycenterimagespickzycenter.logo';
print("

");
move_uploaded_file($_FILES['pickzycenter_logo']['tmp_name'], $file);
print("File uploaded: ".$file."
");
print("

");
?>
Note that you need to change the permanent directory, "pickzycenterimages", used in this script to something else on your Web server. If your Web server is provided by a Web hosting company, you may need to ask them which directories you can use to store files.
If you copy both scripts, logo_upload.php and processing_uploaded_files.php, to your Web server, you can try them to upload an image file to your Web server.   Your Comment




More Software Questions..
What is the inputsplit in map reduce software?

What is software configuration management?

What Is Java Api For Xml-based Rpc (jax-rpc)?

How can you implement fine-grained auditing?

What is IBM’s simple explanation for Big Data’s four critical features?

What is static synchronized method in JDBC API? Give an example?

What does the NULLIF function do?

What happens if a start method is not invoked and the run method is directly invoked?

Should we override finalize method

what is the difference between mysql_fetch_array and mysql_fetch_object?

How will XML affect my document links?

Why to use Style Sheets?

What are Filters in MVC?

Can you explain Application layer in OSI model?

How to define new testplan attributes?

What are the minimum system requirements to run Photoshop? Is it possible to run Photoshop over linux?

Which oracle package is used to manage the oracle lock management services?

What is Latch Up? Explain Latch Up with cross section of a CMOS Inverter. How do you avoid Latch Up?

What is marker interface?

What types of partitioning are there for BW?



Search
Can you Answer!!
  • Q ________ acts as the Chairman of Board of Directors of DICGC
  • Q Query result can be displayed vertically by terminating the query____?
  • Q Explain what is cross docking?
  • Q How to schedule a scenario?
  • Q If you weren't a farmer, what would you be doing?
  • Q List the types of errors.
  • Q Indian Constitution adopted the concept of basic structure from the Constitution of:
  • Q The first secretary of Punjab Naujawan Sabha was:
  • Q How would your plans differ if you knew that all physicians would be working in HMO's in the future?
  • Q What are some built-in Ruby class exceptions.
  • Q There are six drinking glasses standing in a row, with first three full of juice and the next three empty? How can you arrange those glasses so empty and full glasses alternate by moving only one glass?