i-revo labs
ホーム
ヘルプ
i-revoサービス一覧
アクセス
ブックス
ゲーム
マイポータル
create a new page, using
xtra/pear_manual/HTTP_WebDAV_Client
as a template.
[
Front page
|
List of pages
|
Search
|
Recent changes
|
Help
] [
New
]
Start:
These documents are provided under [[PHP license:http://w...
* HTTP_WebDAV_Client [#zdd96fd6]
Official: http://pear.php.net/package/HTTP_WebDAV_Client
PHP の[[ストリームラッパー:http://www.php.net/manual/book...
提供し、WebDAV サーバをファイルシステムのように使うことが...
require で読み込むと webdav スキームが登録されます。
WebDAV サーバでのリソースが http://example.jp/dav/sample....
対応する webdav スキームは webdav://example.jp/dav/sample...
ファイルの読み書きは次のようになります。
require_once('HTTP/WebDAV/Client.php');
# 読み出し
$data = file_get_contents('webdav://example.jp/dav/sampl...
# 書き込み
file_put_contents('webdav://example.jp/dav/sample.bin', ...
ディレクトリも同様に透過的に使えます。
require_once('HTTP/WebDAV/Client.php');
# ディレクトリ一覧の取得
$items = scandir('webdav://example.jp/dav/');
# ディレクトリの作成
mkdir('webdav://example.jp/dav/subdir');
** stream context [#s1c350c2]
HTTP_WebDAV_Client (VERSION>=CVS)で
指定できるストリームコンテキストオプションには
次のようなものがあります。
: user_agent | User-agent を指定します。
: content_type | 送信する Content-type を指定します。
デフォルトでは application/octet-stream になっています。
例は次のようになります。
require_once('HTTP/WebDAV/Client.php');
$opts = array(
'webdav'=>array(
'user_agent'=>'MyClient/0.1',
'content_type'=>'image/jpeg'
)
);
$context = stream_context_create($opts);
# 読み込み
$data = file_put_contents('webdav://example.jp/dav/sampl...
End:
These documents are provided under [[PHP license:http://w...
* HTTP_WebDAV_Client [#zdd96fd6]
Official: http://pear.php.net/package/HTTP_WebDAV_Client
PHP の[[ストリームラッパー:http://www.php.net/manual/book...
提供し、WebDAV サーバをファイルシステムのように使うことが...
require で読み込むと webdav スキームが登録されます。
WebDAV サーバでのリソースが http://example.jp/dav/sample....
対応する webdav スキームは webdav://example.jp/dav/sample...
ファイルの読み書きは次のようになります。
require_once('HTTP/WebDAV/Client.php');
# 読み出し
$data = file_get_contents('webdav://example.jp/dav/sampl...
# 書き込み
file_put_contents('webdav://example.jp/dav/sample.bin', ...
ディレクトリも同様に透過的に使えます。
require_once('HTTP/WebDAV/Client.php');
# ディレクトリ一覧の取得
$items = scandir('webdav://example.jp/dav/');
# ディレクトリの作成
mkdir('webdav://example.jp/dav/subdir');
** stream context [#s1c350c2]
HTTP_WebDAV_Client (VERSION>=CVS)で
指定できるストリームコンテキストオプションには
次のようなものがあります。
: user_agent | User-agent を指定します。
: content_type | 送信する Content-type を指定します。
デフォルトでは application/octet-stream になっています。
例は次のようになります。
require_once('HTTP/WebDAV/Client.php');
$opts = array(
'webdav'=>array(
'user_agent'=>'MyClient/0.1',
'content_type'=>'image/jpeg'
)
);
$context = stream_context_create($opts);
# 読み込み
$data = file_put_contents('webdav://example.jp/dav/sampl...
Page:
お客様サポート
会社情報
採用情報
プライバシーポリシー
ホーム
© 2006-2008 Internet Revolution