2 Replies - 653 Views - Last Post: 08 September 2009 - 05:18 PM Rate Topic: -----

#1 woodjom  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 29
  • View blog
  • Posts: 549
  • Joined: 08-May 08

$_Request superglobal explanation

Posted 08 September 2009 - 01:21 PM

I recently started doing a transition test from PHP to ASP. Although i like my PHP site, i see that there is no real good equivalent to it on the ASP arena. As such, i have started digging into the code-base and started a translation of the code.

The snippet i ran across is this:
$this->mOffset = $this->mRequest->getText( 'offset' );



mRequest is a global variable that has been populated with $_Request.

I have done the equivalent but cant understand the part about getText('offset'). i figure the 'offset' part is the key name and the getText() function is getting the value paired to the key. but as their is little documentation on this member function, web and site code, i need some clarification on this. I am not a hard-core PHP dev, so i missed the boat on this one.

Thanx for the help on this.

Is This A Good Question/Topic? 0
  • +

Replies To: $_Request superglobal explanation

#2 garfinkle  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 27
  • View blog
  • Posts: 87
  • Joined: 08-September 09

Re: $_Request superglobal explanation

Posted 08 September 2009 - 02:27 PM

View Postwoodjom, on 8 Sep, 2009 - 12:21 PM, said:

I recently started doing a transition test from PHP to ASP. Although i like my PHP site, i see that there is no real good equivalent to it on the ASP arena. As such, i have started digging into the code-base and started a translation of the code.

The snippet i ran across is this:
$this->mOffset = $this->mRequest->getText( 'offset' );



mRequest is a global variable that has been populated with $_Request.

I have done the equivalent but cant understand the part about getText('offset'). i figure the 'offset' part is the key name and the getText() function is getting the value paired to the key. but as their is little documentation on this member function, web and site code, i need some clarification on this. I am not a hard-core PHP dev, so i missed the boat on this one.

Thanx for the help on this.


getText is not a standard PHP function it is part of the GNU Localisation Library and is used to write multilingual code.

More information can be found on the wikipedia page

http://en.wikipedia....iki/GNU_gettext
Was This Post Helpful? 0
  • +
  • -

#3 woodjom  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 29
  • View blog
  • Posts: 549
  • Joined: 08-May 08

Re: $_Request superglobal explanation

Posted 08 September 2009 - 05:18 PM

ok thanx.

so standard PHP (OOB), does not include this functionality. But it seems that most if not all PHP builds have this capability. Is this a correct assumption?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1