SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Regex Help

  1. #1
    SitePoint Member
    Join Date
    Feb 2003
    Location
    Vegas Baby
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Regex Help

    I'm developing an Authorization system and I'm stuck on the regex part of it.

    I have a file containing all of the places that a person is allowed to go:
    PHP Code:
    global $roles;

    $roles['god'] = array(
         
    'paths' => array(
              
    "/",
              
    "/index/helloworld/"
         
    )
    ); 
    Now when the page loads I need to compare the uri to the role of the user:
    PHP Code:
    foreach ($roles['god']['paths'] as $path) {
         
    /* compare uri to the path */

    That's where I get stuck, I'm not sure on how to compare both paths.
    Thanks in advance for any help.

  2. #2
    ********* Member website's Avatar
    Join Date
    Oct 2002
    Location
    Iceland
    Posts
    1,238
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    can you give example uri's ?
    - website


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •