![]() |
Can someone tell me what's not working in this code snippet?
I'm having some trouble working from a hardcoded version of this to one that will take a userid and work for everyone. It's the upload script after a flash batch uploader. What I have right now is that the first version works fine, but something is wrong with my syntax (I think, I'm really not a programmer, as you can probably tell) that's keeping the second one from writing the files to the directory they go in. The function check_user_dir looks for a directory corresponding to $uploaduser, and makes one if it's not there. That is working in both versions. It makes a directory called ./uploads/20, and chmods it 777, which is what I need for the next part. Then it doesn't upload the files into that directory. I don't know how to check where it's breaking. I'm guessing it's somewhere in the declaration of $uploaddir, because I don't know how to make a path with all this stuff in it and I can't find a similar example.
Later, I'll figure out how to pass the actual userid to $uploaduser, but for right now I just set it to eliminate that as a problem. I'd really appreciate any help. This script works: PHP Code:
PHP Code:
--------------- Added [DATE]1201845480[/DATE] at [TIME]1201845480[/TIME] --------------- Okay, I had it echo $uploaddir and it gives me the right directory, so that declaration is working. |
Do you realize you don't have $target_encoding defined in the second one (like you do in the first)?
|
Quote:
Thanks. |
Have you checked your error_logs to see if there are any errors in there? I know when I was working with upload code on my site, that was often the only place I could go to get feedback.
|
Thanks.
As it turned out, an include above all that, in the second one, called to something that unset $_FILES, so it was skipping the whole upload part. I've got it working now. |
All times are GMT. The time now is 09:14 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|