I need help, is there a way of writing this code without getting errors.thanks

<?php public function f_misc_getfile( &$Txt, &$File, $LastFile = "" ) { $Txt = ""; $fd = @fopen( @$File, "r", @true ); if ( $fd === false ) { if ( $LastFile === "" ) { return false; } $File2 = dirname( $LastFile )."/".$File; $fd = @fopen( @$File2, "r", @true ); if ( $fd === false ) { return false; } $File = $File2; } if ( $fd === false ) { return false; } $fs = @filesize( @$File ); if ( $fs === false ) { while ( !feof( $fd ) ) { $Txt .= fread( $fd, 4096 ); } } if ( 0 < $fs ) { $Txt = fread( $fd, $fs ); } fclose( $fd ); return true; } ?>

mrema,

I replied to one of your other posts regarding the same issue. Change this:[php]public function f_misc_getfile( &$Txt, &$File, $LastFile = “” )[/php]
to…[php]function f_misc_getfile( &$Txt, &$File, $LastFile = “” )[/php]

See if that works.

Sponsor our Newsletter | Privacy Policy | Terms of Service