I'm thinking of how to allow users to set up new areas using PHP. Creating the folders and files would be done during signup.
Users would then be able to upload various files, including PHP files, to their area.
What I want to do is separate out the different areas, so if a user's area is /user1/ they can't access someone else's file like this:
fopen('../user2/file.php');
or write to another user's area like this:
file_put_contents('../user2/file.php', $mybadcontent);
Basically I want to be able to completely separate out each user area, so they can't access or execute each other's files.
Is this even possible? Is it going to be complex Apache rules, using htaccess?