Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. meusite.com/App1/index.php
  2. meusite.com/App2/index.php
  3. meusite.com/OutroDir/App3/index.php
  4.  
  5. // Restringe acesso ao App1:
  6. $acesso = array('App1');
  7. $_SESSION['acesso'] = $acesso;
  8.  
  9. // Restringe acesso ao App1 e App2:
  10. $acesso = array('App1', 'App2');
  11. $_SESSION['acesso'] = $acesso;
  12.  
  13. function VerificarSessao($FSession, $FApp){
  14.  
  15. return in_array($FApp, $FSession);
  16.  
  17. }
  18.  
  19. VerificarSessao( $_SESSION['acesso'] , basename(__DIR__) );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement