Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: Uploading images
10-28-2003, 03:16 PM #1
- Join Date
- Nov 2002
- Thanked 0 Times in 0 Posts
I have a piece of code that I've used before to upload an image from a form to a specified folder, and it has worked fine.
copy($_FILES['img1']['tmp_name'], "images/userpics/".$_FILES['img1']['name']) or die("Couldn't copy the file!");
I've obtained the name of the folder from the form and it is stored in the variable $imgfolder. The code I have for the actual upload is as follows, but I am getting a failure on it.
copy($_FILES['imgfull']['tmp_name'], "images/".$imgfolder."/".$_FILES['imgfull']['name']) or die("Couldn't copy the file!");
10-28-2003, 07:39 PM #2
- Join Date
- May 2002
- Perth Australia
- Thanked 96 Times in 94 Posts
whats the error ? , my crystal ball suggests "permission denied" (in which case you need to chmod the folders appropriately) but I dont believe in fortune tellers
MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)