 |
| ::: T4VN Statistics ::: |
PHP Scripts : 61 |
PHP Example : 67 |
PHP Tutorials : 21 |
PHP News : 93 |
Total Coupon : 36 |
Other Tutorials : |
Member : 209 |
Visitor Online : 2 |
Today Visit: 309 |
Total Visitor : 262319 |
Most Online : 31 |
|
 |
 |
Display code
Author : kongshoj
A small script that display the code from a file. Adds line numbers for easy reading.
| PHP Example : | | <?php
$width=75; // Used for wordwrap
$filename="guest.php"; // Filename to print out to screen
if($script=fopen($filename,"r")){
echo "<pre>";
$i=1;
while (!feof($script)){
$buffer=fgets($script,4096);
printf("%3d: ",$i);
echo wordwrap(htmlspecialchars($buffer),$width,"n ");
$i++;
}
fclose($script);
echo "</pre>";
}else
echo "Error opening file";
?>
| |
| |

|
 |
| ::: Resources ::: |
|
|
| ::: New Templates ::: |
|
| ::: Other Tutorials ::: |
|
 |