?
Solved

Make directory with copy

Posted on 2009-05-14
2
Medium Priority
?
206 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 111

Expert Comment

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

Accepted Solution

by:
Ray Paseur earned 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
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 dynamically set the form action using jQuery.
Suggested Courses

764 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