Viewing File: /opt/alt/tests/alt-php81-pecl-rar_4.2.0-1.el8/tests/100.phpt

--TEST--
fopen modes 'r' and 'rb' are the only allowed
--SKIPIF--
<?php if(!extension_loaded("rar")) print "skip"; ?>
--FILE--
<?php

$file = 'rar://' . rawurlencode(dirname(__FILE__) . '/linux_rar.rar')
		. '#/plain.txt';

echo "Testing 'r'\n";
$fd = fopen($file, 'r');
if ($fd) echo "opened\n\n";

echo "Testing 'rb'\n";
$fd = fopen($file, 'rb');
if ($fd) echo "opened\n\n";

echo "Testing 'r+'\n";
$fd = fopen($file, 'r+');
if ($fd) echo "opened\n\n";

echo "\n";
echo "Done.\n";
?>
--EXPECTF--
Testing 'r'
opened

Testing 'rb'
opened

Testing 'r+'

Warning: fopen(%s): %cailed to open stream: Only the "r" and "rb" open modes are permitted, given r+ in %s on line %d

Done.
Back to Directory File Manager
<