File: remote-files.xml

package info (click to toggle)
phpdoc 20020310-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 35,272 kB
  • ctags: 354
  • sloc: xml: 799,767; php: 1,395; cpp: 500; makefile: 200; sh: 140; awk: 51
file content (113 lines) | stat: -rw-r--r-- 3,154 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<?xml version="1.0" encoding="iso-8859-8-i"?>
<!-- EN-Revision: 1.13 Maintainer: shlomi Status: ready -->
 <chapter id="features.remote-files">
  <title>  </title>

  <para>
     &quot;URL fopen wrapper&quot; 
   (          
   <option>--disable-url-fopen-wrapper</option>  - configure (  4.0.3)
       -<parameter>allow_url_fopen</parameter> -off  php.ini
   (  )), 
      HTTP -FTP      
   ,   <function>require</function>
   - <function>include</function>.
  </para>
  <para>
   <note>
    <para>
           <function>require</function>
     - <function>include</function>   .
    </para>
   </note>
  </para>
  <para>
   ,     -    web ,
     ,     ,    
            .
  </para>
  <para>
   <example>
    <title>    </title>
    <programlisting role="php">
<![CDATA[
<?php
$file = fopen ("http://www.php.net/", "r");
if (!$file) {
    echo "<p>Unable to open remote file.\n";
    exit;
}
while (!feof ($file)) {
    $line = fgets ($file, 1024);
    /* This only works if the title and its tags are on one line */
    if (eregi ("<title>(.*)</title>", $line, $out)) {
        $title = $out[1];
        break;
    }
}
fclose($file);
?>
]]>
    </programlisting>
   </example>
  </para>
  <para>
       -FTP        
          .
      FTP    -'anonymous',    
    (    ) ,   
   'ftp://user:password@ftp.example.com/path/to/file'.
   (         HTTP 
      Basic authentication ).
  </para>
  <para>
   <example>
    <title>   </title>
    <programlisting role="php">
<![CDATA[
<?php
$file = fopen ("ftp://ftp.php.net/incoming/outputfile", "w");
if (!$file) {
    echo "<p>Unable to open remote file for writing.\n";
    exit;
}
/* Write the data here. */
fputs ($file, "$HTTP_USER_AGENT\n");
fclose ($file);
?>
]]>  
    </programlisting>
   </example>
  </para>
  <para>
   <note>
    <para>
            log     
	  ,          .
        ,  -<function>syslog</function>.
    </para> 
   </note>
  </para>

 </chapter>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->