Can't upload file |
[eluser]ArifBD[/eluser]
I am a newbie in CodeIgniter.. i am trying to upload file .. I am following "CodeIgniter User Guide Version 2.1.3: CodeIgniter Home › User Guide Home › File Uploading Class" example for file uploading.. but every time it returns "The upload path does not appear to be valid".... I am using windows 7 operating system and folder permission is set to everyone full permission.... I have also tried from the example of "CodeIgniter from Scratch- Day 9 - File Uploading and Image Manipulation - Nettuts+" and having the same problem... Please need urgent support
[eluser]noslen1[/eluser]
Can you post your controller function code ? Have you created you upload folder in your installation ? CI won't do it for you. What is your $config['upload_path'] ?
[eluser]ArifBD[/eluser]
i have simply use the code from the following page.... and yes i have created a folder name "uploads" in root directory and as it was not working i also created same folder in the application directory. http://ellislab.com/codeigniter/user-gui...ading.html Controller: upload.php Code: <?php
[eluser]j0se[/eluser]
Hi. webserver can write in ./uploads/ ?? Check folder permisions. The folder is in root where are aplication, system folders???
[eluser]ArifBD[/eluser]
"D:\xampp\htdocs\upload\uploads" and also "D:\xampp\htdocs\upload\application\uploads" are the physical folder location, but according to the code it should have been the first one. as it was not working i created the second folder... and yes i have already check the folder permission as i mentioned earlier.
[eluser]j0se[/eluser]
Change the name of your folder... "D:\xampp\htdocs\upload\uploads" to "D:\xampp\htdocs\uploads\uploads" config_path is set to "./uploads/" ![]()
[eluser]ArifBD[/eluser]
it doesn't mater if it is upload or uploads or any xyz at that position .... u can get the full code at http://ellislab.com/codeigniter/user-gui...ading.html
[eluser]noslen1[/eluser]
Is your Upload library autoloaded in your /config/autoload.php file ? If so, try initialize your config with : Code: $this->upload->initialize($config); instead of : Code: $this->load->library('upload', $config);
[eluser]j0se[/eluser]
You dont understand me (my english is bad). I try again, when you configure the settings you say that the folder will be "./uploads/" and in your webroot ( D:\xampp\htdocs\ ) the folder is upload .... I think that you rename the folder o change the config_path. Not¿?
[eluser]noslen1[/eluser]
I think /upload/ (without S) is his root directory where CI is installed, and /uploads/ his upload directory where to put upload files |
Welcome Guest, Not a member yet? Register Sign In |