Hi
I'm trying to open a file from my OS (Window 7) from my web host server. But it can't load the files. I try fget() but it seems like it's not reading it?
<?php
session_start();
header("Cache-control: private");
include("include/capable.php");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="css/link.css" type="text/css" rel="stylesheet">
</head>
<body>
<? include("header.php");?>
<?php
$filename="$_SERVER[DOCUMENT_ROOT]/filelinks/data.file";
if (!file_exists($filename)){ // Check for file existence
print "No such file or directory";
exit();
}
$fh=fopen($filename,"r"); // Open the file for reading
while( !feof($fh)){
$line_of_text=fgets($fh); // Get text line from the
file
print "$line_of_text";
}
fclose($fh); // Close the file
?>
<? include("footer.php");?>
</body>
</html>