Jump to content

Recommended Posts

No.  '/' will go to the root directory.  There are few cases where you need to hard-code a path.

 

If you're in the directory "public_html" you can use:

 

mkdir("rimgs");

 

and it will create the foldef "rimgs" in the public_html dir.

No.  '/' will go to the root directory.  There are few cases where you need to hard-code a path.

 

If you're in the directory "public_html" you can use:

 

mkdir("rimgs");

 

and it will create the foldef "rimgs" in the public_html dir.

 

so it would always be good to use the "/" to start at the root just to make sure where ever the script is processed it the folder is created in the right area.

 

thanks for the info

No.  For portability reasons you should use relative paths.  Your development environment and production environment should maintain the same directory structure, even if it's from windows to linux.

 

i.e.

 

Your folder structure looks like this:

 

/dir1/dir2/includes/

/dir1/dir2/main/

 

You're currently in the 'main' directory and you want to create a folder called 'rimgs' in the includes folder.  You would code it like:

 

mkdir("../includes/rimgs");

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.