CodeIgniter Forums
Base directory for CG installation - 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: Base directory for CG installation (/showthread.php?tid=45711)



Base directory for CG installation - El Forum - 10-02-2011

[eluser]thisischris[/eluser]
Hey guys.

I'm trying to create an upload controller that'll accept two files and some text inputs.
However if one upload fails, I need to delete the first upload. However I'm not sure how I can call the 'base' url of the CG installation to keep it modular.

Code:
unlink('/main_site/uploads/example.txt')
In case I move main_site or rename it.

Thank you!