954,587 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

run php page with variables in command line???

Hey there

I know one can use include http://domain/page.php?var1=xxx&var2=xxx

But I dont need an include

This is what I need to do, and how on earth can I achieve this? I've burnt my brains already.

Please help me.

$command = "/usr/bin/php5 -f /home/path/to/file/test.php?folder=777";


then run the command.

so,
test.php needs to know the folder code.

is there a way to do this, or maybe a suggestion for something else?

I cant do an include, have to do it by executing a command.

thanx

sallecpt
Junior Poster in Training
54 posts since Apr 2010
Reputation Points: 10
Solved Threads: 3
 

Perhaps exec() or shell_exec()?

twiss
Veteran Poster
1,005 posts since Apr 2010
Reputation Points: 177
Solved Threads: 101
 

if url is http://domian/index.php?var=123&Var2=98123
To get the var you used a $_GET

$commend = 'shell/bin/'.$_GET['var'].'/';

all u do is put your var name, in the cass eather var or Var2 in the [' var ']

jnicholls92
Newbie Poster
4 posts since Apr 2011
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: