Not sure the title I gave this was appropriate, but I will try to describe my problem as best as possible.

Basically, I'm trying to find the correct url reference for the mkdir() function.

Let me type up a FTP Structure diagram to help:

{ROOT}
   -inventory
      -FF
         -<I am here>

(/inventory/FF/index.php)

I'd like to create a directory in the inventory folder from the index.php file.

Example:

{ROOT}
   -inventory
      -<new folder>
      -FF
         -<I am here>

(/inventory/newFolder/)

So, having said that, what URL reference would I need to put in the mkdir() function?

I have tried the following:

mkdir("./inventory/newFolder/");
mkdir("../inventory/newFolder/");
mkdir("/inventory/newFolder/");

Thanks in advance for any help or tips

I've never used it with the last "/" on the dirname but this should work mkdir("/inventory/newFolder"); that is if you have write permission in the "inventory" folder.

this should also work though mkdir("../inventory/newFolder");

I've never used it with the last "/" on the dirname but this should work mkdir("/inventory/newFolder"); that is if you have write permission in the "inventory" folder.

this should also work though mkdir("../inventory/newFolder");

Thanks for the tip, it worked.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.