Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hi, I have problem to open a XML file that stored in other computer.
We use Microsoft IIS as web server and I create a PHP file to access the file.
This is the script:Code: Select all
<?php
function LoadTpl($template="") {
$filename = $template;
if ( file_exists($filename) ) {
if ( $FH = fopen($filename, "r") ) {
$template = fread( $FH, filesize($filename) );
fclose($FH);
} else {
die("The file can't opened.");
}
} else {
die("File ".$filename." isn't found.");
}
return $template;
}
$temp=LoadTpl("http://[IP target]/[filename][.][extension of file]");
echo $temp;
?>How to open a file in another computer? I use IP address but failed.
I need your guidance.
Thanks for your help !
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]