![]() |
[Solved] Saving Temp File Outside of Doc Root - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: [Solved] Saving Temp File Outside of Doc Root (/showthread.php?tid=21612) Pages:
1
2
|
[Solved] Saving Temp File Outside of Doc Root - El Forum - 08-16-2009 [eluser]quest13[/eluser] I tried the same as you mentioned , but unlink() throws the following error, Any help in this regard ? I loaded "$this->load->helper('file');" before applying unlink(), Is there anything else needed on this ? Severity: Warning Message: unlink() [function.unlink]: http does not allow unlinking Filename: models/test_model.php Line Number: 1120 [Solved] Saving Temp File Outside of Doc Root - El Forum - 08-17-2009 [eluser]tomcode[/eluser] Apparently You use unlink not with a file path but with an URL. [Solved] Saving Temp File Outside of Doc Root - El Forum - 08-17-2009 [eluser]CoffeeBeanDesign[/eluser] Indeed, unlink() only works with actual server paths - Code: unlink('c:/xampp/htdocs/myfile.txt'); or Code: unlink('../myfile.txt'); Otherwise, you could do : Code: unlink('http://codeigniter.com'); [Solved] Saving Temp File Outside of Doc Root - El Forum - 08-17-2009 [eluser]quest13[/eluser] Thanks a lot. I was giving virtual path ! it is working great with physical path. But in spite of successful delete, it throws some error message. I suppressed it by @unlink. Will it harm anyway when being uploaded to Linux server later ? Thanks to both of you for the fast response. [Solved] Saving Temp File Outside of Doc Root - El Forum - 08-18-2009 [eluser]CoffeeBeanDesign[/eluser] What was the error message?? I've personally found that whilst you can do a lot to make your local environment (xampp or whatever) match your production environment as much as possible there are inevitably slight adjustments you need to make. The error reporting on your local server may be different. You may be able to let this error go and not worry about it, for my part I'm normally super anal about errors and try to resolve them even if they are inconsequential. As a rule I don't like using @function() if I can avoid it. |