Sheesh!
I have written a script that automatically opens two folders upon a new user registering with the site. The first folder is the usernames name, and the second folder (inside the first) is called "images". Both are set to chmod 0777 for now (still in testing).
When I delete a member from an admin script I have written I want to be able to delete both of these folders (as well as the usual clearing stuff out of the database etc).
I am using a function that will do this but I think I have a path problem. Bear with me on this...
First thing to note is that the function definately works if it is in the same directory as the folders that I want to delete. However, I want to move it out of that section and put it into an admin folder on my site. These are the paths...
html_pages/folderA1/folderA2
html_pages/folderB1/folderB2
*N.B These are mythical folder names but the idea is the same*
The script to delete the folders is in folderA2 and the folder I want to delete is folderB2.
When my script was in html_pages I used the path './folderB1/folderB2' and this deleted it.
Now.. the script is in folderA2.. what should the path be??
I have tried '../../folderB1/folderB2' but to no avail. I have also tried the full unix path to the folder, but to no avail. I've come up against a brick wall....
Has anyone any ideas ? Pleeeeaase before I tear my last two hairs out !
Thanks for any help you can give me (I hope I've made the problem clear enough)
Cheers
JT I don't make mistakes, I'm merely beta-testing life.
I have written a script that automatically opens two folders upon a new user registering with the site. The first folder is the usernames name, and the second folder (inside the first) is called "images". Both are set to chmod 0777 for now (still in testing).
When I delete a member from an admin script I have written I want to be able to delete both of these folders (as well as the usual clearing stuff out of the database etc).
I am using a function that will do this but I think I have a path problem. Bear with me on this...
First thing to note is that the function definately works if it is in the same directory as the folders that I want to delete. However, I want to move it out of that section and put it into an admin folder on my site. These are the paths...
html_pages/folderA1/folderA2
html_pages/folderB1/folderB2
*N.B These are mythical folder names but the idea is the same*
The script to delete the folders is in folderA2 and the folder I want to delete is folderB2.
When my script was in html_pages I used the path './folderB1/folderB2' and this deleted it.
Now.. the script is in folderA2.. what should the path be??
I have tried '../../folderB1/folderB2' but to no avail. I have also tried the full unix path to the folder, but to no avail. I've come up against a brick wall....
Has anyone any ideas ? Pleeeeaase before I tear my last two hairs out !
Thanks for any help you can give me (I hope I've made the problem clear enough)
Cheers
JT I don't make mistakes, I'm merely beta-testing life.