Why can't I include a remote php file (ie include("http://domain.com/file.php"))?

Both including a PHP file and the ability to include a PHP file could have very high security risks for your site and the entire server. A hacker who gains access to your account through improper coding is going to have a much easier time executing code on the system if he/she is allowed to include remote files. In most cases, the reason you are including a remote file is to have the content show up on your web page. If that is the case, then you will be able to use the following function and still maintain the security of your website in regards to including remote php files: echo ( file_get_contents( "http://domain.com/file.php") );
  • 0 Bu dökümanı faydalı bulan kullanıcılar:
Bu cevap yeterince yardımcı oldu mu?

İlgili diğer dökümanlar

Can PHP use the mail() Function?

 Yes. On both regular plans and ASP plans, PHP is able to use the mail() function to send out...

How can I have the server parse html files as if they were php?

 This only applies to linux hosting accounts:Inside the directory with the html...

How do I set php.ini variables for my application?

 Since we run PHP as CGI, you can create your own php.ini and place it beside your scripts. So...

PHP5.3

Saarthi Supports PHP 5.3 in addition to PHP 5.2 on our Linux Personal Class and Business Class...