PHP failed to read file??
$dir =opendir (Root_path. " Frame/hack ");
while ($file =readdir ($dir)) {
if (Is_file (Root_path. " frame/hack/$file/data.sql ")) {
$sql =readover (Root_path. " frame/hack/$file/data.sql ");
Preg_match_all ("/insert into ' qb_hack ' ([^ ']+) \ (' ([^ ']+ ') ', ' ([^ ']+ ') '/is ', $sql, $array);
$_array = @include (Root_path. ") frame/hack/$file/fix.php ");
if ($_array[setup]==2) {
$_array[input]= "Checked onclick= ' return false '";
}elseif ($_array[setup]==1) {
$_array[input]= ' checked ';
}
$Harray [$file]=array (
' Name ' =>implode (', ', $array [3]),
' Input ' =>$_array[input],
);
}
}
Read and Write
function Readover ($filename, $method = "RB") {
if ($handle = @fopen ($filename, $method)) {
Flock ($handle, lock_sh);
$filedata =fread ($handle, FileSize ($filename));
Fclose ($handle);
}
return $filedata;
}
function Writeover ($filename, $data, $method = "rb+", $iflock =1) {
Touch ($filename);
$handle =fopen ($filename, $method);
if ($iflock) {
Flock ($handle, LOCK_EX);
}
$show =fputs ($handle, $data);
if ($method = = "rb+") ftruncate ($handle, strlen ($data));
Fclose ($handle);
return $show;
}
Here is the foreground read format
$rs [Name]
Why, the above section of PHP run, nothing is displayed, where is the problem?? PHP function
------Solution--------------------
If it's Linux, see if the file has permission to read.
------Solution--------------------
First of all the suppression of the wrong @ are removed, to see what is wrong