Page 1 of 1

Can't pass include file parameters

Posted: Tue Oct 31, 2006 5:22 am
by amir
in my page i want to include this file on a remote server outside our company.

i also want to pass the page some parameters and ive stored all my parameter values in a variable called: $param.

include('http://www.remotesite.co.uk/intranet/pe ... ?'.$params);

but i get an error telling me that the stream failed to open.

ive looked around for an answer to this issue, but havent found anything yet that is a solution

Posted: Tue Oct 31, 2006 6:03 am
by thomas777neo
Rather use the header function to do that.

http://www.php.net/manual/en/function.header.php

Edit: Your php page should already exist on the remote server, you cannot pass parameters through the include function like that, essentially, if you include the file, the variables on the page where you included the file are available to that file.

Posted: Tue Oct 31, 2006 9:25 am
by amir
Thanks and Cheers.