Jump to content
php.lv forumi

File


K|NG

Recommended Posts

kurš fails pirmais jāatver $a vai $b ?

kurš fails pirmais jāaizver $a vai $b?

un vai šitā būs lāga?

kods:

<code><font color="#000000">
<font color="#0000CC"><?php
$a </font><font color="#006600">= </font><font color="#0000CC">[url=http://lv.php.net/fopen]fopen[/url]</font><font color="#006600">(</font><font color="#CC0000">'aaa.txt'</font><font color="#006600">,</font><font color="#CC0000">'w+'</font><font color="#006600">);
</font><font color="#0000CC">$b </font><font color="#006600">= </font><font color="#0000CC">fopen </font><font color="#006600">(</font><font color="#CC0000">'bbb.txt'</font><font color="#006600">, </font><font color="#CC0000">'r'</font><font color="#006600">);
while (!</font><font color="#0000CC">feof </font><font color="#006600">(</font><font color="#0000CC">$b</font><font color="#006600">)) {
</font><font color="#0000CC">$buffer </font><font color="#006600">= </font><font color="#0000CC">[url=http://lv.php.net/fgets]fgets[/url]</font><font color="#006600">(</font><font color="#0000CC">$b</font><font color="#006600">, </font><font color="#0000CC">4096</font><font color="#006600">);
echo </font><font color="#0000CC">$buffer</font><font color="#006600">;
</font><font color="#0000CC">[url=http://lv.php.net/fwrite]fwrite[/url]</font><font color="#006600">(</font><font color="#0000CC">$a</font><font color="#006600">,</font><font color="#0000CC">$buffer</font><font color="#006600">);
}
</font><font color="#0000CC">[url=http://lv.php.net/fclose]fclose[/url]</font><font color="#006600">(</font><font color="#0000CC">$b</font><font color="#006600">);
</font><font color="#0000CC">[url=http://lv.php.net/fclose]fclose[/url]</font><font color="#006600">(</font><font color="#0000CC">$a</font><font color="#006600">);
</font><font color="#0000CC">?></font>
</font>
</code>

Link to comment
Share on other sites

kurš fails pirmais jāatver $a vai $b ?

kurš fails pirmais jāaizver $a vai $b?

un vai šitā būs lāga?

kods:

<code><font color="#000000">
<code><font color="#000000">
<font color="#0000CC"><font color="#0000CC"><?php</font><font color="#006600"><</font><font color="#0000CC">br </font><font color="#006600">/></font><font color="#0000CC">$a </font><font color="#006600"></</font><font color="#0000CC">font</font><font color="#006600">><</font><font color="#0000CC">font color</font><font color="#006600">=</font><font color="#CC0000">"#006600"</font><font color="#006600">>= </</font><font color="#0000CC">font</font><font color="#006600">><</font><font color="#0000CC">font color</font><font color="#006600">=</font><font color="#CC0000">"#0000CC"</font><font color="#006600">>[</font><font color="#0000CC">URL</font><font color="#006600">=</font><font color="#0000CC">http</font><font color="#006600">:</font><font color="#FF9900">//lv.php.net/fopen]fopen[/URL]</font><font color="#006600">(</font><font color="#CC0000">'aaa.txt'</font><font color="#006600">,</font><font color="#CC0000">'w+'</font><font color="#006600">);<br /></font><font color="#0000CC">$b </font><font color="#006600">= </font><font color="#0000CC">fopen </font><font color="#006600">(</font><font color="#CC0000">'bbb.txt'</font><font color="#006600">, </font><font color="#CC0000">'r'</font><font color="#006600">);<br />while (!</font><font color="#0000CC">feof </font><font color="#006600">(</font><font color="#0000CC">$b</font><font color="#006600">)) {<br /></font><font color="#0000CC">$buffer </font><font color="#006600">= </font><font color="#0000CC">[url=http://lv.php.net/fgets]fgets[/url]</font><font color="#006600">(</font><font color="#0000CC">$b</font><font color="#006600">, </font><font color="#0000CC">4096</font><font color="#006600">);<br />echo </font><font color="#0000CC">$buffer</font><font color="#006600">;<br /></font><font color="#0000CC">[url=http://lv.php.net/fwrite]fwrite[/url]</font><font color="#006600">(</font><font color="#0000CC">$a</font><font color="#006600">,</font><font color="#0000CC">$buffer</font><font color="#006600">);<br />}<br /></font><font color="#0000CC">[url=http://lv.php.net/fclose]fclose[/url]</font><font color="#006600">(</font><font color="#0000CC">$b</font><font color="#006600">);<br /></font><font color="#0000CC">[url=http://lv.php.net/fclose]fclose[/url]</font><font color="#006600">(</font><font color="#0000CC">$a</font><font color="#006600">);<br /></font><font color="#0000CC"></font><font color="#0000CC">?></font></font>
</font>
</code></font>
</code>

da kaada skirba? :P

Link to comment
Share on other sites

×
×
  • Create New...