Hello there,
I have a php file on my server and I would like only logged in admins from forum to be able to access that file. Can I somehow do it using ssi or something?
Thanks! :)
Load SSI.php, then after that line add:
isAllowedTo('admin_forum');
Do that before anything else on the page.
Q: Could you do that using file permissions? If it was readable only by the owner, would that work?
This assumes, of course, that there's one admin and they're the site owner.
Not really, no.
Poodles. :)
Cumber's suggestion looks like the perfect and super simple suggestion. I'm not aware of any SSI use other than by admins, might even be worth making that change to SSI permanent.
For my education, if non-admins ever use SSI could you give me an example?
Apart from, say, the entire purpose for which the file was designed. SSI = Simple Site Integration. (The 'original' meaning of Server Side Includes primarily relates to SHTML and not PHP)
Like, for example, providing a login form to external sites. Or pulling board news on to a front page outside the forum. Or indeed any kind of integration without using a portal.
Thank you for the info. My chief use of SSI has been in its application to mod packages. I've never been a portal kind of person.
Thank you, works like a charm! :)