Hello to all, Will you please tell me or help me about my problem regarding php include. When I am using include no result is displaying... For example view.php is stored at my siteA.com and I want o include that file in my siteB.com So what I am doing to call the file is include "http://siteA.com/view.php"; but no result is showing. The screen is blank. I am expecting something like displaying some message or what inside the view.php I tried at siteA.com the following code include "view.php"; and it works well but if I tried this include "http://siteA.com/view.php"; not working... any idea why it's not working and any solution for this?
enable "allow_url_fopen" in php.ini: should be: allow_url_fopen = On But as said above it is a big security risk.
you can't do this... cause include function only work on relative part or full part of your file.... and not work on remote file... and if you try to get php file using file_get_content, the result not your file script but your output script (like html source code) cause server (siteA.com) will compile php file. but if your file is txt (not php) you can do this (file_get_content) cause the server on siteA.com not compile txt file
Yeah, include, include_once, require, require_once functions work for files that place at relative path.