Jump to content

Recommended Posts

ok, im trying to figure out how to link to a previous directory, like i know i can use

"$dirname = basename(dirname(__FILE__));" to get the name of the current directory. but say  the folders are /public_html/galleries/members/ADMIN/RANDOM <----- RANDOM is the current directory, but how would i write code to take the previous directory 'ADMIN' and put it in a variable????? ive tried "$dirname = basename("../".dirname(__FILE__));" and stuff like that, but it doesnt work?????

any help is greatly appreciated  :)

Link to comment
https://forums.phpfreaks.com/topic/145579-getting-previous-directory-name/
Share on other sites

thank you and it kindof works, somehow it puts 'array' into the link for all but one picture.

the first picture is fine "galleries/members/BREMINEM/RANDOM/1234963429.jpg",

and all the rest are like this now "galleries/members/ADMIN/RANDOM/Array/1234920795.jpg"

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.