eval - PHP Error Undefined Functions -
i getting error undefined function.
here code:
$myvar = "@file_get_contents"; eval($myvar("http://someurlupdatehere.com")); error is: <b>fatal error</b>: call undefined function @file_get_contents() ..
it looks weird me trying do. tend "don't use eval, don't that!" ;)
anyway, here comes right syntax:
$myvar = "@file_get_contents"; eval("$myvar('http://someurlupdatehere.com');");
or if need return value of file_get_contents()
in variable (what likely, use this:
$myvar = "@file_get_contents"; eval("\$file = $myvar('http://someurlupdatehere.com');"); echo $file;
Comments
Post a Comment