Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6839257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:41:50+00:00 2026-05-26T23:41:50+00:00

I am on a linux server and want to do following First Create a

  • 0

I am on a linux server and want to do following

First Create a Directory in abc/data with name “123” so it become

abc/data/123

and then copy file edf/igk/123/aa.jpg to abc/data/123/aa.jpg

but don’t know where is problem

My Code

mkdir('abc/data/123');
copy("edf/igk/123/aa.jpg","abc/data/123/aa.jpg ");
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T23:41:50+00:00Added an answer on May 26, 2026 at 11:41 pm

    mkdir() will only create a single directory (the one at the END of the path specification), unless you turn on its second flag:

    mkdir('abc/data/123', 0777, TRUE);
                                ^^^^
    

    Without that flag, the ‘abc’ and ‘abc/data’ directories MUST exist before you can create the ‘123’ directory. With the flag enabled, PHP will create any missing intermediate directories for you.

    As well, since you’re using relative paths, the ‘edf’ directory must exist as a subdirectory in whatever directory is your “current working directory”. If it’s not in your cwd, then you’ll have to change you path to point to it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following issue here: I want to write a server streaming data
I want to access MySQL through ruby on a shared linux server. I figure
I want to use telnet to google mail server on linux. I want to
I want to install SWIG on My linux server to test some stuff. How
I'd like to setup a svn server on a linux box with the following
I'm install elastic search 0.16.2 on Debian Linux.I want to connect elastic server which
I have a lot of spare intel linux servers laying around (hundreds) and want
I want to write a long running process (linux daemon) that serves two purposes:
On one Linux Server running Apache and PHP 5, we have multiple Virtual Hosts
We have a Linux server application that is comprised of a number of open-source

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.