Revision 19792,
426 bytes
checked in by Seasoft, 13 years ago
(diff) |
#744(PHP4 互換用途ソースを将来的に切り捨てやすい仕組みづくり)
|
Line | |
---|
1 | --TEST--
|
---|
2 | Function -- file_get_contents
|
---|
3 | --SKIPIF--
|
---|
4 | <?php if (function_exists('file_get_contents')) { echo 'skip'; } ?>
|
---|
5 | --FILE--
|
---|
6 | <?php
|
---|
7 | require_once 'PHP/Compat.php';
|
---|
8 | PHP_Compat::loadFunction('file_get_contents');
|
---|
9 |
|
---|
10 | $tmpfname = tempnam('/tmp', 'php');
|
---|
11 | $handle = fopen($tmpfname, 'w');
|
---|
12 | fwrite($handle, "test test");
|
---|
13 | fclose($handle);
|
---|
14 |
|
---|
15 | echo file_get_contents($tmpfname);
|
---|
16 |
|
---|
17 | unlink($tmpfname);
|
---|
18 | ?>
|
---|
19 | --EXPECT--
|
---|
20 | test test |
---|
Note: See
TracBrowser
for help on using the repository browser.