Jump to content


Photo

Creating folders via PHP?


  • Please log in to reply
3 replies to this topic

#1 Mutley

Mutley
  • Members
  • PipPipPip
  • Advanced Member
  • 765 posts

Posted 17 September 2006 - 04:12 PM

How do you create folders using PHP? Like you would via FTP? Able to give it a name to?
~ Mutley.

#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 17 September 2006 - 04:20 PM

http://ca.php.net/ma...ction.mkdir.php
Legend has it that reading the manual never killed anyone.
My site

#3 Wintergreen

Wintergreen
  • Members
  • PipPipPip
  • Advanced Member
  • 107 posts

Posted 17 September 2006 - 04:22 PM

http://www.php.net/m...ction.mkdir.php

#4 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 17 September 2006 - 04:27 PM

quick example for you.

<?php
if(isset($_POST['submit'])){

$name=$_POST['name'];

@mkdir($name);

}

?>

<form method="POST" action="test_name.php">
<br>
please tell me your dir name
<br>
<input type="text" name="name">
<br>
<input type="submit" name="submit" value="send">

The rest read the link ok.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users