Solved

Make directory with copy

Posted on 2009-05-14
2
199 Views
Last Modified: 2012-05-07
How can I create a directory if it does not already exsist when using copy() ?
copy($filename,'my/directory/that/needs/to/be/created/'.$filename);

Open in new window

0
Comment
Question by:hankknight
  • 2
2 Comments
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 24388018
Look at mkdir()
0
 
LVL 108

Accepted Solution

by:
Ray Paseur earned 500 total points
ID: 24388044
But after reading the fine man page, it looks like the second parameter is a path, and will be created for you.  PHP 4 or PHP 5?

http://us.php.net/manual/en/function.mkdir.php
http://us.php.net/manual/en/function.copy.php
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
PHP7 and Sql Server Windows 2008 R2 13 85
mysqli 3 18
Change text to radio button and calendar form 2 32
PHP preg_replace code convert to Delphi 14 30
Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now