Page 1 of 1

File includes in my script from other server...

Posted: Sun Jan 12, 2003 4:34 am
by astp
subj. :oops:

I tried many things, but ... :?: :?: :?:

I tried this :

Code: Select all

<?

$a = readfile("http://localhost/~mafia/server_file.php");

?>
and it works...even U work width database :)

sorry about trouble :(

Posted: Sun Jan 12, 2003 4:57 am
by volka

Code: Select all

<?php echo date("m.d.y"); ?>
consider what the php-processor receives. If it reads from your local filesystem via include('dir/file.php'); it's most likely that it will see the script-code. But if you include something like include('http://oter.site/file.php'); the script might have been already parsed by the php-processor of the other server and only 12.01.2003 is read - not the script itself. There is no way to avoid this behaviour if you do not have access to the unparsed script-source.