I have no problems accessing local files with code like this.
Code: Select all
$filename = "C:\Documents and Settings\User\Desktop\aaa.htm";
$handle = fopen($filename, "r");
$contents = fread($handle, filesize($filename));
fclose($handle);Code: Select all
testfunction();
include "C:\Documents and Settings\User\Desktop\functions.php";Code: Select all
<?php
function testfunction()
{
echo "Example function.\n";
return 2;
}
?>Fatal error: Call to undefined function readit() in C:\Documents and Settings\Us
er\Desktop\regex.php on line 24
However, when I try doing it like this just as a test:
Code: Select all
testfunction();
function testfunction()
{
echo "Example function.\n";
return 2;
}
include "C:\Documents and Settings\User\Desktop\functions.php";Fatal error: Cannot redeclare readit() (previously declared in C:\Documents and
Settings\User\Desktop\regex.php:34) in C:\Documents and Settings\User\Desktop\fu
nctions.php on line 6
So include seems to be declaring that function, but however I can't seem to be able to use it. Anyone know what's going on?