acctman
acctman

Reputation: 4349

Find string in REQUEST_URI

I need help with searching the content of the REQUEST_URI.

If $_SERVER['REQUEST_URI'] contains rmb_twi then do something.

Upvotes: 1

Views: 7461

Answers (2)

Phil
Phil

Reputation: 165065

This is beyond simple. Read the manual entry for strpos()

if (false !== strpos($_SERVER['REQUEST_URI'], 'rmb_twi')) {
    // do something
}

Upvotes: 10

alex
alex

Reputation: 490637

if (strstr($_SERVER['REQUEST_URI'], 'rmb_twi')) {
   ...
}

Upvotes: 3

Related Questions