Welcome Guest, Not a member yet? Register   Sign In
mkdir issue
#1

[eluser]Unknown[/eluser]
Hi.

This is my first post on this forum. I'm pretty sure I cant find a solution to my problem anywhere else and I've love and help people can give me.

I'm trying to create a new directory.

I want it to be in the uploads/events folder.

I'm using.

Code:
// $id is set and is just numbers.
mkdir(base_url().'uploads/events/'.$id, 0777);

I'm not getting any errors but I'm also not getting my new folder.

It works if I run it from the C drive.

Code:
mkdir('C:\wamp\www\Lions\uploads\events/17', 0777);

but I want it to work with base_url() or APPPATH or something dynamic.

Thanks for any tips!
#2

[eluser]danmontgomery[/eluser]
base_url() is a web path, use BASEPATH for path to the system directory, or getcwd() for the path to index.php
#3

[eluser]Unknown[/eluser]
That worked perfectly! Thanks so much!




Theme © iAndrew 2016 - Forum software by © MyBB