$sign = !isset($_GET['s']) ? 1 : $_GET['s'];
$nome = !isset($_GET["Nome"]) ? "None" : $_GET['name'];
function parse_ini_file2($f)
{
$newline = "<br>";
$null = "";
$r=$null;
$first_char = "";
$sec=$null;
$comment_chars="/*<;?>";
$num_comments = "0";
$header_section = "";
//Read to end of file with the newlines still attached into $f
$f=@file($f);
// Process all lines from 0 to count($f)
for ($i=0;$i<@count($f);$i++)
{
$newsec=0;
$w=@trim($f[$i]);
$first_char = @substr($w,0,1);
if ($w)
{
if ((!$r) or ($sec))
{
// Look for [] chars round section headings
if ((@substr($w,0,1)=="[") and (@substr($w,-1,1))=="]") {$sec=@substr($w,1,@strlen($w)-2);$newsec=1;}
// Look for comments and number into array
if ((stristr($comment_chars, $first_char) === FALSE)) {} else {$sec=$w;$k="Comment".$num_comments;$num_comments = $num_comments +1;$v=$w;$newsec=1;$r[$k]=$v;}
//
}
if (!$newsec)
{
//
// Look for the = char to allow us to split the section into key and value
$w=@explode("=",$w);$k=@trim($w[0]);unset($w[0]); $v=@trim(@implode("=",$w));
// look for the new lines
if ((@substr($v,0,1)=="\"") and (@substr($v,-1,1)=="\"")) {$v=@substr($v,1,@strlen($v)-2);}
if ($sec) {$r[$sec][$k]=$v;} else {$r[$k]=$v;}
}
}
}
return $r;
}
$s significa que й uma string. E tudo que tiver GET, se refere que estб getando algo (pegando algo).
|
Entгo como eu nгo entendo PHP, e nгo conheзo que entenda venho aqui postar esta duvida,
ja que aqui existem varios programadores. Eu gostaria de saber o que ocorre nestas duas linhas: PHP код:
|
Muito obrigado minha primeira duvida foi sanada
![]() agora quanto a duvida sobre as funcoes poderiam responder? |
Vou te dar uma explicaзгo bem bбsica, ali ele estб criando uma funзгo, tudo que tiver dentro do 'function parse_ini_file2($f){' nгo й bom mexer.
|
A duvida era qual seria a diferenca enre a funcao padrao e akela ali feita
|
Nгo vi a funзгo nativa, entгo nao posso dizer a diferenзa, '-'
|