目次

PHP:関数使用例:ファイルシステム:fopen

分類

ファイルシステム

機能

ファイルまたは URL をオープンする

sample

ソース

<html>
<head>
<title>t_file_exist.php</title>
<body>
<?php
$file_name ="/home/hoge/public_html/test/test.txt";
$file = fopen($file_name,"r") or die("File Open Error");
echo "File Open OK";
?>
</body>
</html>

出力結果

File Open Error
File Open OK