How to include the method return value in PHP code: functionpageindex ($ count) {$ print & quot; $ & quot ;. & quot; SPLITNUM & quot ;. $ count. & quot; $ print. & quot; if (& quot ;. & quot; $ & quot ;. & quot; _ GET [go] & how to include the method return value in PHP code
Method:
Function pageindex ($ count)
{
$ Print = "$". "SPLITNUM =". $ count .";";
$ Print = $ print. "if (". "$ ". "_ GET ['go'] = \"\")". "{". "$ ". "PAGEINDEX = 1;} else ". "{". "$ ". "PAGEINDEX = ". "$ ". "_ GET ['go'];}";
Return $ print;
}
I cannot test many methods.
Pageindex (8 );
Echo (pageindex (8 ));
Print (pageindex (8 ));
?>
The desired php file code after inclusion
$ SPLITNUM = 8; if ($ _ GET ['go'] = "") {$ PAGEINDEX = 1 ;} else {$ PAGEINDEX =$ _ GET ['go'];}
?>
------ Solution --------------------
PHP code
$ S = pageindex (8); eval ("$ s;"); echo $ PAGEINDEX;
------ Solution --------------------
Pageindex (8) // Split
Writing
Eval (pageindex (8 ));