Uploading MP3 |
[eluser]rijobo[/eluser]
Hello, I'm trying to build a form in which you can upload mp3 files. When I use the code below, it does put some data in the database, but it doesn't upload the file to the server and it also doesn't put the path in the database. What do I do wrong? Controller: Code: function create(){ Model: Code: function addMuziek(){ View: Code: <h1><?php echo $title;?></h1>
[eluser]slowgary[/eluser]
This is just a guess, but are you sure this path is correct? Code: $config['upload_path'] = './muziek/';
[eluser]rijobo[/eluser]
Thanks for your help! I'm using this path also for my images and that works fine. I'm using a wamp server local on my pc, so standard my directory should be writable I believe.
[eluser]rijobo[/eluser]
Can someone please help me? I need to show this in 45 minutes and I can't find what I do wrong.
[eluser]danmontgomery[/eluser]
do_upload() by default is looking for a field named 'userfile'. If this isn't the name of your upload field name (looks like 'muziek' in your case), you need to pass that value to do_upload(). From the user guide, Quote:$this->upload->do_upload()
[eluser]rijobo[/eluser]
Done that, but still it doesn't fill my database with the path and the upload isn't taking place. |
Welcome Guest, Not a member yet? Register Sign In |