Jump to content

mkdir() Error ... help, please ?


techiefreak05

Recommended Posts

i have the following that creates a folder to store a users image when they register ..:

[code]
<?php 
$DIR = "/files/uploads/" .$uname. "/images/";
mkdir($DIR)
?>
[/code]
it says something like directory does not exist or something ...
"$uname" equals the value of the the username field in my sign up form.

I even tried this:
[code]
<?php
  mkdir("/files/uploads/" .$_POST[user]. "/images/", 0700);
?>
[/code]
with the same result and no success
Link to comment
https://forums.phpfreaks.com/topic/29482-mkdir-error-help-please/
Share on other sites

I tried this:

  mkdir(files/uploads/$_POST[user], 0700);
  mkdir($_POST[user]. "/images/", 0700);

but it got an error ...

why cant i create the dir in uploads?? i did this like 2 weeks ago .. it just stopped working all of a sudden !!!

it HAS to be under:: files/uploads/USERNAME
when i create :: username/images/  folder in the current directorey and not in :: files/uploads .. i can see the :: username/images/ folder


NOTICE :::::

I can use this and it works fine ::
WORKS:

<?php
   mkdir("files/uploads/" .$_POST[user], 0777);
?>
DOES NOT WORK:
<?php
   mkdir("files/uploads/" .$_POST[user]. "/images/", 0777);
?>

but i cant add the images folder !! but i need to . cuz soon im gonna add different kinds of uploads ...other than images ....
(( I AM HOSTING ALL THIS ON MY OWN COMPUTER)) not an online host. im not done with m site yet so im not yet releasing it.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.