# PHP - Creating Folders

**URL:** <https://forum.kirupa.com/t/php-creating-folders/60289>\
**Category:** programming\
**Created:** [August 8, 2004, 5:54pm UTC](https://forum.kirupa.com/t/php-creating-folders/60289 "2004-08-08T17:54:49Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 8, 2004, 5:54pm UTC](https://forum.kirupa.com/t/php-creating-folders/60289/1 "2004-08-08T17:54:49Z")

</div>

Can PHP create folders and set permissions to them? I only found o 1 exapmple on a forum and it wasn’t even an example really, just chat.

Anyone have any links, examples?

Thanks  
Digit’al

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 8, 2004, 6:12pm UTC](https://forum.kirupa.com/t/php-creating-folders/60289/2 "2004-08-08T18:12:50Z")

</div>

hm… I’ve never heard of this, I don’t think so… but then again, there is alot I don’t know about 😃

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 8, 2004, 7:43pm UTC](https://forum.kirupa.com/t/php-creating-folders/60289/3 "2004-08-08T19:43:48Z")

</div>

[http://www.php.net](http://www.php.net)  
[http://ca3.php.net/manual/en/function.mkdir.php](http://ca3.php.net/manual/en/function.mkdir.php)  
[http://ca3.php.net/manual/en/function.chmod.php](http://ca3.php.net/manual/en/function.chmod.php)

If you can’t find it on google or a forum you should check out [php.net](http://php.net) and put in a search either thru the function list or wholesite. Chances are you can do it. PHP is a very well built programming language and just about anything you need can be done with it. If something does not exist, you can always just exec(); a shell command.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 8, 2004, 10:06pm UTC](https://forum.kirupa.com/t/php-creating-folders/60289/4 "2004-08-08T22:06:14Z")

</div>

> [@Marble](#):
>
> [http://www.php.net](http://www.php.net)  
> [PHP: mkdir - Manual](http://ca3.php.net/manual/en/function.mkdir.php)  
> [PHP: chmod - Manual](http://ca3.php.net/manual/en/function.chmod.php)
> 
> If you can’t find it on google or a forum you should check out [php.net](http://php.net) and put in a search either thru the function list or wholesite. Chances are you can do it. PHP is a very well built programming language and just about anything you need can be done with it. If something does not exist, you can always just exec(); a shell command.

thanks man this seems to be what I was looking for, I’ll repost after I try it out 🙂

only concern is that the guy is hosting the site himself, hope you don’t have to do anything crazy to php.ini to get this to work 😉

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 8, 2004, 10:32pm UTC](https://forum.kirupa.com/t/php-creating-folders/60289/5 "2004-08-08T22:32:06Z")

</div>

If he has safe\_mode enabled you might have problems running certain things, like exec(); but these are standard functions that do not require any extensions installed. Some of the php.ini settings can be altered via .htaccess. Which ones I would have to look into. I know you can alter upload size for sure and I am sure there are plenty of others…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 8, 2004, 10:32pm UTC](https://forum.kirupa.com/t/php-creating-folders/60289/6 "2004-08-08T22:32:47Z")

</div>

thanks for the info,working on this now 😉

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 8, 2004, 10:49pm UTC](https://forum.kirupa.com/t/php-creating-folders/60289/7 "2004-08-08T22:49:46Z")

</div>

you can make a file with this in it:

\<?php

phpinfo();

?\>

and it will list your friends compile settings. I am assuming he is using Linux…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 9, 2004, 4:59am UTC](https://forum.kirupa.com/t/php-creating-folders/60289/8 "2004-08-09T04:59:14Z")

</div>

btw, there’s a php function called ini\_set or something that lets you configure the php ini file, if unflux is reading this, I’d love to know if he disabled this on his hosting?
