PDA

View Full Version : Upload Problem


mschuyler
07-18-2007, 07:48 PM
Here is my problem...

I created an upload script, that upload's a single image to the server that works perfectly as it should. I named the file upload.php and put it at mydomain.com/upload.php which does not use VBulletin.

Now here is where the problem comes in. I want to insert the code that is in upload.php into a php file that is used in a Vbulletin template. Basically, I have a plugin that uses these php files and I basically entered the script from upload.php file into one of these php files that the plugin uses. When I go to the plugin, it shows my upload form, but it does not actually upload the file. So I don't know exactly what I am doing wrong because I have the script that works perfectly outside of Vbulletin templates, but once I enter it into Vbulletin it doesnt work. If anyone could give me some insight i'd really appreciate it. Thanks in advance.

Twilkey
07-18-2007, 08:13 PM
Try to make your on vb page and see if it works.

Attilitus
07-18-2007, 08:21 PM
How are you putting it inside vbulletin? (The template engine will not parse php code, if you are trying to add your code that way.)

Make a plugin in global_start and put this code:


ob_start();
include('/path/to/file/');
$yourvariable = ob_get_contents();
ob_end_clean();


Edited: Changed it to the proper way of doing it. (Found Kirk posted this solution in response to another post)