Jump to content

Calling external application


ghgarcia

Recommended Posts

My include statement is the following:

 

  include ("emailpicks.php?week=$week&user=$user"); 

 

The error that I get is:

 

Warning: main(emailpicks.php?week=5&user=ghgarcia) [function.main]: failed to open stream: No such file or directory in /usr/local/4admin/apache/vhosts/lvbash.com/httpdocs/football/entry.php on line 168

 

The php app emailpicks.php does exist not sure what this error means.

 

Thanks,

George

Try this...

 

$week = $week;

$user = $user;

include ("emailpicks.php");

 

But you shouldn't need to do that. If $week and $user are already defined in your main script, and in your include script it is expecting these variables, then they will already be available.

 

You DON'T need to call any globals. The variables can be accessed no matter what.

 

//File1.php
$a = "Hi!";

//File2.php
include("File1.php");
echo($a); //Outputs "Hi!"

 

So that means...

//File1.php
$week = 36;
$user = "XaeroDegreaz";

include("emailpicks.php");

//emailpicks.php
echo("Week: $week / User $user"); //Outputs the stuff.

 

Just ensure that you have already defined the variable contents before you call the include.

 

Try this...

 

$week = $week;

$user = $user;

include ("emailpicks.php");

 

But you shouldn't need to do that. If $week and $user are already defined in your main script, and in your include script it is expecting these variables, then they will already be available.

 

You DON'T need to call any globals. The variables can be accessed no matter what.

 


 

Just ensure that you have already defined the variable contents before you call the include.

 

 

That did the trick thanks. Really appreciate the help.

 

George

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.