I have this php
www.example.com/template.php
and would like to include it in a index.php file at
sub.example.com/index.php
and this sub-domain is on a different server with a different host.
Please advice.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can download the file contents into a php file then include that,
I’d recommend changing the name from index.php tho, and make sure the php file isn’t being parsed first when you getting it.
There is also nothing safe about this.
Edit: Another option,
There is a php.ini option called allow_url_include.
http://php.net/manual/en/features.remote-files.php