tags:

views:

229

answers:

2

Hi, i'm using Xampp. When I tried to do this earlier, it worked, but now it is not working.

I'm trying to make a directory in my www folder to hide it from baddies who steal files.

Each user gets their own folder in uploads to put their files on.

Xampp uses apache, and Xampp is a local web server. It allows me to design websites without the need of an online host. The www folder is in my C:\program files\xampp\php\www\ and I need to make a directory there. I know it's possible because i've done this before, I have just forgotten how to make it happen.

When I make a directory I use:

$uploaddir1 = "xampp/php/www/uploads/".$esclcusername."/"; mkdir($uploaddir1,0777);

Do I need to include C:\program files\ before xampp?

And finally, how would this be possible on a real online web host?

A: 
  1. you need to make sure that you give permisions to the parent folder to create dirs in it (0777)
  2. to get the full path you can use dirname(FILE) wich will return the path for the directory of the file in wich it is runned
solomongaby
+1  A: 

Hey Sam,

I saw your question here and searched some on google. This is what i found:

mkdir("D:/hshome/rubygirl58/gameparody.com/clansites/".$sitename."/lib", 0777)

So yes, I think you have to include the complete path.

Greetings,

Younes

Younes
Hey, i have answered your question. Could you please accept the answer?Thanks alot :).
Younes
Please accept my answer :)
Younes