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

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.