Hi i have a php page that when it is submitted it does some stuff and then in an 'if' block does the following: include "http://127.0.0.1/paragon/client_hist.php?aid=$agent_ID"; when i run this i get an error: Warning: include(http://127.0.0.1/paragon/client_hist.php) [function.include]: failed to open stream: HTTP request failed! HTTP/1.1 401 Access Denied in C:\Inetpub\wwwroot\paragon\account_save.php on line 69 Warning: include() [function.include]: Failed opening 'http://127.0.0.1/paragon/client_hist.php' for inclusion (include_path='.:/usr/local/lib/php') in C:\Inetpub\wwwroot\paragon\account_save.php on line 69 However if i run it just like include"client_hist.php"; it works and goes to the page i need. However I need to pass a variable to the next page!!! and if i do include"client_hist.php?aid=$agent_ID" I get an error: Warning: include(client_hist.php?cid=33) [function.include]: failed to open stream: Invalid argument in C:\Inetpub\wwwroot\paragon\account_save.php on line 69 Warning: include() [function.include]: Failed opening 'client_hist.php?cid=33' for inclusion (include_path='.:/usr/local/lib/php') in C:\Inetpub\wwwroot\paragon\account_save.php on line 69 I guess its looking for the exact file name including ?cid=33 ??? I am not sure whats happening with this stuff: my php.ini includes the following: safe_mode = Off safe_mode_gid = Off safe_mode_include_dir = Off include_path = ".:/usr/local/lib/php" #read this somewhere don't know why??tried others file_uploads = On allow_url_fopen = On allow_url_include = On I don't know what else u need to know just help!
The above (by nico) would work fine. You can also use the absolute url to your website: include('http://SERVERID/~username/pagetoinclude.php'); PHP: Which will only work if your server can recognize it is from the same server. Peace,