The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
PHP code problem
Hi all,
I have an issue with this code. What seems to happen is when it creates the file from the chunked upload it stores it in /temp/ It should join all the parts then store it here /temp/USERNAME/ PHP Code:
this is part of the function that works with it. PHP Code:
|
#2
|
|||
|
|||
Where is that code going (if it's a plugin, which hook)? You might need a
PHP Code:
|
#3
|
|||
|
|||
Hi again KH99
This is in a custom php page, it calls global at the beginning... I even wrote out an template register variable that calls $temp_dir and it outputs /temp/Mick/ But I am not sure why its writing the file to /temp/ and NOT /temp/Mick PHP Code:
|
#4
|
|||
|
|||
Oh, so the part that's missing is $fileName. I don't see that being set anywhere in the code you posted.
|
#5
|
|||
|
|||
ahh sorry,
I missed the function the function PHP Code:
the code PHP Code:
|
#6
|
|||
|
|||
It's because the $vbulletin variable can not be reached inside the function you use.
You have to use "global $vbulletin;" inside of the function or pass the $vbulletin variable as a 5th argument to the function. |
#7
|
|||
|
|||
Quote:
Is that the same with all functions? If I want to use vbbulletin variables Cheers |
#8
|
||||
|
||||
Yes, that's always the case, not only in vB. Global variables are never available inside functions in PHP, you always need to pull them in like that.
|
#9
|
|||
|
|||
Quote:
Thank you all for the support Mick |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|