Jump to content

Failing to open an included file


db530

Recommended Posts

Alright, I have no idea why this won't work. I'm using PHP5, it worked fine on PHP4. I get this error when I'm trying to include another php script:

 

Warning: include(product_other_details.php?pid=774&d_type=details) [function.include]: failed to open stream: No such file or directory in /data/16/1/57/83/1546246/user/1664829/htdocs/product_info.php on line 296

 

Warning: include() [function.include]: Failed opening 'product_other_details.php?pid=774&d_type=details' for inclusion (include_path='.:/usr/services/vux/php5/lib/php') in /data/16/1/57/83/1546246/user/1664829/htdocs/product_info.php on line 296

 

You can see for yourself at: http://www.industrialpc.com/product_info.php?pid=774

 

Here is the line (296) in the code: include "product_other_details.php?pid=$_GET[pid]&d_type=$dtype" ?>... that seems to be working because in the error it gives 'product_other_details.php?pid=774&d_type=details' whick works.

 

Anyway, I've changed the .ini file so include is on, checked to make sure the page thats being included is there. Any other ideas? I'm totally lost, thanks for any help.

Link to comment
https://forums.phpfreaks.com/topic/106673-failing-to-open-an-included-file/
Share on other sites

Are you trying to include the GENERATED version? As in the copy you would see in a browser? You need to use a URL for the include

 

What do you mean use a URL for the include? Yes I want to include the generated version if this is what you mean: http://www.industrialpc.com/product_other_details.php?pid=774&d_type=details

 

that should be in the box where the errors are coming up on http://www.industrialpc.com/product_info.php?pid=774

 

thanks for the response

Use the full URL:

include("http://servername.com/product_other_details.php?pid=774&d_type=details");

 

hmm, well that got rid of the error messages but now it is just blank. Should I have some type of statement like echo for it to actually show up on there? this is just driving me nuts because it worked before. I appreciate the help

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.