EzPortal - Portal Software for Forums

EzPortal Forums => Support => Topic started by: jcsnider on December 06, 2009, 04:36:04 pm

Title: PHP Ezblock
Post by: jcsnider on December 06, 2009, 04:36:04 pm
Every time I try to use the PHP Ezblock, it always says I have the wrong syntax...
here is the code I am trying to use...
<? $myFile = "users.txt";
$fh = fopen($myFile, 'r');
$theData = fread($fh, filesize($myFile));
fclose($fh);
echo $theData; ?>

Any Ideas?
Title: Re: PHP Ezblock
Post by: EzPortal on December 07, 2009, 06:48:14 pm
Looks fine. I would try using the following and putting the full path to the file just in case
Code: [Select]
<?php 
$myFile 
"users.txt"
$fh fopen($myFile'r'); 
$theData fread($fhfilesize($myFile)); 
fclose($fh); 
echo 
$theData
?>