Skip to main content
added 22 characters in body
Source Link
Unicron
  • 7.5k
  • 1
  • 28
  • 19

i need to call a php inside another php file and pass some arguments also. how can i do this?? i tried

include("http://.../myfile.php?file=$name");

include("http://.../myfile.php?file=$name");
  • but gives access denied. i read like v must not set allow_url_open to OFF.

if i write like $cmd = "/.../myfile.php?file=".$name"; $out =exec($cmd. " 2>&1"); echo $out;

$cmd = "/.../myfile.php?file=".$name";
$out =exec($cmd. " 2>&1");
echo $out;
  • gives error as /.../myfiles.php?file=hello: no such file or directory.

how can i solve this???

i need to call a php inside another php file and pass some arguments also. how can i do this?? i tried

include("http://.../myfile.php?file=$name");

  • but gives access denied. i read like v must not set allow_url_open to OFF.

if i write like $cmd = "/.../myfile.php?file=".$name"; $out =exec($cmd. " 2>&1"); echo $out;

  • gives error as /.../myfiles.php?file=hello: no such file or directory.

how can i solve this???

i need to call a php inside another php file and pass some arguments also. how can i do this?? i tried

include("http://.../myfile.php?file=$name");
  • but gives access denied. i read like v must not set allow_url_open to OFF.

if i write like

$cmd = "/.../myfile.php?file=".$name";
$out =exec($cmd. " 2>&1");
echo $out;
  • gives error as /.../myfiles.php?file=hello: no such file or directory.

how can i solve this???

Source Link
su03
  • 225
  • 3
  • 6
  • 13

calling php file fron another php file while passing arguments

i need to call a php inside another php file and pass some arguments also. how can i do this?? i tried

include("http://.../myfile.php?file=$name");

  • but gives access denied. i read like v must not set allow_url_open to OFF.

if i write like $cmd = "/.../myfile.php?file=".$name"; $out =exec($cmd. " 2>&1"); echo $out;

  • gives error as /.../myfiles.php?file=hello: no such file or directory.

how can i solve this???