News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

!isset and snet_init ?

Started by Dhayzon, June 04, 2013, 11:23:46 AM

Previous topic - Next topic

Dhayzon

What does this mean?  ???


/* - SIMPLE NETWORK - */
// If SN's supposed to be running... well, bloody get it running!
if(!empty($modSettings['snet_enable']) && !isset($_REQUEST['info']))
{
global $sourcedir;
require_once($sourcedir . '/snet/SimpleNetwork.php');

snet_init($memID);

$user_profile[$memID]['url'] = '';
}


MrPhil

"isset()" is a built-in PHP function. In this particular case, it will return true if "info" is being passed through $_GET or $_POST arrays. You use it to check if a variable (including array elements) is set before querying it (which would be an undefined variable error if the variable doesn't exist).

Dhayzon

Quote from: MrPhil on June 04, 2013, 01:25:30 PM
"isset()" is a built-in PHP function. In this particular case, it will return true if "info" is being passed through $_GET or $_POST arrays. You use it to check if a variable (including array elements) is set before querying it (which would be an undefined variable error if the variable doesn't exist).


thank you very much

Advertisement: