You are now ready to write a test script to
check that the extension works. Here’s a sample script that opens a file
test.txt, prints its contents to the standard output, and creates a copy of the
file as test.txt.new:
<?php
$fp_in = file_open(”test.txt”, “r”) or die(”Unable to open input
file\n”);
$fp_out = file_open(”test.txt.new”, “w”) or die(”Unable to open
output file\n”);
while (!file_eof($fp_in)) {
$str = file_read($fp_in, 1024);
print($str);
file_write($fp_out, $str);
}
file_close($fp_in);
file_close($fp_out);
?>
-
‹ Home
-
Categories
-
Tags
acrobat adobe amazon apple basic of computer CSS css3 current news David Hill delete dell escape google Hack HP IBM IE interesting news internet IT Javascript keyboard knowledge laptop lenovo miscellaneos tricks mouse event mozilla firefox Netezza Corp news News and Alerts onmouseout onmouseover opera oracle PC pdf Robin Johnson safari shortcuts sun microsystems Teradata Corp Tips and tricks windows yahoo
-
Archives
-
RSS Feeds
-
Account
Post a Comment