We have created a small portal where there are interactions amongst the subdomains, the folder structure is like below:
-- news (news.website.com)
-- games (games.website.com)
-- my (my.website.com)
-- www (www.website.com)
-- cms (cms.website.com)
-- asset (asset.website.com)
now the websites are only www (the main site), news, games, cms, and my.
asset is where we keep all the images, files, and scripts.
library is where we keep the php config files and the functions.
Now for example in the cms.website.com we would like to delete a game the game files and thumbnails are all inside: asset.website.com/game/42 (42 being the ID of the game).
Normally what I do is call a function which I have created before:
deleteFolder("folder location") which just unlinks the files and then deletes. This always worked when there was just one website all we had to do was:
deleteFolder("../../asset/game/42") and it would be deleted.
In this case ../../ does not go anywhere outside the cms.website.com therefore it wont delete.
On the other hand deleteFolder("asset.website.com/game/42") does not work either.
What can I do?
Also another example is login; basically all actions that are general amongst all subdomains we execute them in the my.website.com/actions folder. Therefore if I am in news.website.com and want to login it should be something like this:
<form action="http://my.website.com/actions/login.php" method="post">
where action happens then it redirects back to the URL where the user was on.
but of course this does not work. placing ../../my/actions/login.php also does not work.
Please help me out here.
Must I ask the Hosting company to do something to allow interactions amongst subdomains? Or is there a way I can write this to allow it to work?