Forums

PHP

This topic is locked

Creating a Directory Problem

Posted 04 Jan 2005 15:27:11
1
has voted
04 Jan 2005 15:27:11 Law Blank posted:
I am trying to create and name a directory using mkdir(); by passing a variable from Flash. It doesn't seem to like what I am doing, any suggestions?

<?php
$newfolder= $fname;
mkdir($fname,0755);
mkdir("./" . $fname . "/texte",0755);
mkdir("./" . $fname . "/thumbs",0755);
?>

The output I am looking for is a Directory created named fname (input text from Flash) and then 2 sub-directories are created within the new directory.

Flash is passing the folder name variable fine, but I am not familiar enough with the syntax of PHP to understand where I am going wrong.

Any help would be greatly appreciated!!!

Cheers,
~Law

~Law

"If you always do what you've always done, then you will always get what you have always gotten."

Replies

Replied 04 Jan 2005 21:12:22
04 Jan 2005 21:12:22 Chris Charlton replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>I am trying to create and name a directory using mkdir(); by passing a variable from Flash. It doesn't seem to like what I am doing, any suggestions?
...
Flash is passing the folder name variable fine, but I am not familiar enough with the syntax of PHP to understand where I am going wrong.<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

PHP mkdir() documentation: www.php.net/mkdir , you might want to read up the user comments at the bottom, especially "ramonklown at pop dot com dot br 16-Nov-2004 10:59", and "timo dot hummel at 4fb dot de 28-Jun-2003 05:00" - those may have fixes you're looking for. <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

Reply to this topic