starting the chapter on files
This commit is contained in:
parent
da075b76ba
commit
15b891ff97
7
docroot/html/data.txt
Normal file
7
docroot/html/data.txt
Normal file
@ -0,0 +1,7 @@
|
||||
dogs
|
||||
cats
|
||||
babies
|
||||
monkeys
|
||||
hats
|
||||
dollars
|
||||
ham
|
29
docroot/html/files.php
Normal file
29
docroot/html/files.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
require_once('_head.php');
|
||||
|
||||
mkheader('files!', '#aaa');
|
||||
|
||||
?>
|
||||
<body>
|
||||
|
||||
<!-- ======================================================= -->
|
||||
<pre><?php
|
||||
|
||||
// do nothing!
|
||||
$handle = fopen('data.txt', 'r');
|
||||
fclose($handle);
|
||||
|
||||
?></pre>
|
||||
|
||||
|
||||
<!-- ======================================================= -->
|
||||
<pre><?php
|
||||
|
||||
// get everything!
|
||||
echo file_get_contents('data.txt');
|
||||
|
||||
?></pre>
|
||||
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user