[PHP-users 12787] 【リモートファイルの操作について】

zomu php-users@php.gr.jp
Fri, 24 Jan 2003 13:48:14 +0900


まつざきと申します。

fopenを使用してリモートファイルを読み込もうとしているのですが
うまくいきません。

サーバを:http://www.test.com とします。
読み込みたいファイルが:/home/USER/public_html/index.html
であるとします。

コードは
-----------------------------------------------------------------
$file = "http://www.test.com/home/USER/public_html/index.html";
$fp = fopen( $file, 'r' );
$fp = ( $fp, LOCK_SH );
$data = fgets( %fp, filesize( $file ) );
fseek ( $fp, 0 );
fputs ( "dat_file" );
fclose ( $fp ); 
-----------------------------------------------------------------

なのですが、うまくいきません。

ご教授願えませんでしょうか。

■環境
turbo linux6 workstation
PHP version 4.2.3
Apache 1.3.27


matuzaki