実際のパスを取得する
■ 実際のパスを取得する
realpath関数を使うと、相対パスを基に絶対パスを取得することができます。 文字列 = realpath (相対パス) <?php header("Content-Type: text/plain; charset=EUC-JP"); echo "相対パス「.」の実パス:" . realpath("."); ?> <戻る
realpath関数を使うと、相対パスを基に絶対パスを取得することができます。
文字列 = realpath (相対パス)
<?php header("Content-Type: text/plain; charset=EUC-JP"); echo "相対パス「.」の実パス:" . realpath("."); ?>
<戻る