Welcome Guest, Not a member yet? Register   Sign In
best way to create a folder with CI
#1

[eluser]phpnoob[/eluser]
What is the best way to create a folder on my server with CI? I looked at the zip class, and add_dir() doesnt work. I also looked at the ftp class, but I dont want to ftp connect each time I need a new directory.

So is there a class, that I can use to create and delete folders?
#2

[eluser]Jelmer[/eluser]
A very outlandish suggestion for which CI won't need a library because it's already part of something else by the cryptic name "PHP" Wink

mkdir()

and to remove

rmdir()
#3

[eluser]phpnoob[/eluser]
Thanks Jelmer, you answered my question.

Yes, I know php can do that, just thought maybe codeigniter had something already.
#4

[eluser]Jelmer[/eluser]
The question then is: what more do you need?
But most of the answer to that is probably going to have a lot to do with implementation. I wrote a class wrapping those functions for an application of mine which does some input checking and limits where they may be used. But that's very application specific code that can't be ported to another application easily. I'd recommend doing something like that if you're writing an application where users get to create/edit&delete; directories. But CI doesn't come with a basic implementation for such a goal.

Also, when asking such a question and knowing PHP can do it - you might want to include some more specifics in your question or you're never gonna get the answer you're looking for and just the basic answer.
#5

[eluser]phpnoob[/eluser]
My application will implement very simple create/edit/delete directories functionality, its something that will be happening in the background. I will write a simple class to store these functions specific to my app. Ill phrase myself better in the future.

Thanks for all your help!
#6

[eluser]phpnoob[/eluser]
Wow, the questions that I used to ask... embarrassing.
#7

[eluser]InsiteFX[/eluser]
LOL!

InsiteFX




Theme © iAndrew 2016 - Forum software by © MyBB