П️
Size: a a a
П️
H
YH
r
2.0.4
r
v7.30.1
AS
a
http://127.0.0.1/empty.txt
на обоих компах возвращается реально пустой файл?AS
http://127.0.0.1/empty.txt
на обоих компах возвращается реально пустой файл?AS
echo "<?php echo json_encode(file_get_contents('http://127.0.0.1/empty.txt'));?>" | php56
a
<?php
header('Content-Type: text/plain; crharset=utf-8');
error_reporting(E_ALL|E_STRICT);
$base_url = 'https://test.weeb.nonrp.nl/';
echo "filename\tfile()\tfile_get_contents()\r\n";
foreach(['empty','lf','crlf','empty-bom'] as $fn){
$url="{$base_url}{$fn}.txt";
echo "{$fn}.txt\t";
echo json_encode(file($url))."\t";
echo json_encode(file_get_contents($url))."\r\n";
}
V
AS
a
AS
php56 -i | grep -i auto_detect_line_endings
a
<?php
header('Content-Type: text/plain; crharset=utf-8');
error_reporting(E_ALL|E_STRICT);
$base_url = 'https://test.weeb.nonrp.nl/';
echo "filename\tfile()\tfile_get_contents()\r\n";
foreach(['empty','lf','crlf','empty-bom'] as $fn){
$url="{$base_url}{$fn}.txt";
echo "{$fn}.txt\t";
echo json_encode(file($url))."\t";
echo json_encode(file_get_contents($url))."\r\n";
}
AS