Well, I still think your code should work, I just think there is a level issues. This line:
// var $originalDir = “…/…/data/original/”.$_POST[‘cat’];//this has to work but it doesn’t
Should work, it does for me. But, the following code will not work if the values are not correctly set!
if (!file_exists($this->originalDir)) {
mkdir($this->originalDir);
}
So, you need to change this code to display the values as I mentioned before. Echo and die… Then, you can look at that value and see where the problem lies. For instance , if you try to create a file at dir1/dir2/dir3/27,
you first have to create dir1, then, dir1/dir2, next dir1/dir2/dir3, then dir1/dir2/dir3/27… So, that might be your problem. Not sure if that helps, but, it could be the issue…