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 7028729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:26:47+00:00 2026-05-28T00:26:47+00:00

I am working on a command line program in PHP and I am having

  • 0

I am working on a command line program in PHP and I am having trouble, my first problem is when I call PHP’s mkdir() it is giving me this error

Warning: mkdir(): No such file or directory in 
E:\Server\_ImageOptimize\OptimizeImage.php
on line 196

I then read in the PHP docs a user comment that said that the forward slash / does not work with this method under Windows but on Unix.

So I then changed my code to change them to backslashes but it did not change anything for me, I still got the same error on the same line.

Here is the code below can someone help me figure this out please

// I tried both of these below
$tmp_path = '\tmp\e0bf7d6';
//$tmp_path = '/tmp/e0bf7d6';

echo $tmp_path;

mkdir($tmp_path);
  • 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-28T00:26:48+00:00Added an answer on May 28, 2026 at 12:26 am

    The actual problem is that mkdir() only creates one subdirectory per call, but you passed it a path of two non-existant directories. You would normally have to do this step by step:

    mkdir("/tmp");
    mkdir("/tmp/e0b093u209");
    mkdir("/tmp/e0b093u209/thirddir");
    

    Or use the third parameter shortcut:

    mkdir("/tmp/e0b093u209", 0777, TRUE);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently working on a command line tool and since this is my first
I am working out a small program where I provide the command line arguments
I have this code down and this working fine from command line ... But
When working with a command line program, via a c# class method. How do
Possible Duplicate: Windows Program: How to snoop on command line arguments? I am working
I'm working on a Markdown command line program, and I'd like to format source
I'm currently working on a small utility program that only requires a command line
I'm working on a C++ program that accepts a filename as a command line
I'm working on a command line application for Solaris, written in Java6. I'd like
I am working on a C++ based command line tool and I want to

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.