Answer the question
In order to leave comments, you need to log in
[PHP] - Is the array acting strange or did I make a mistake somewhere?
Hello everyone, please help me solve this problem!
There is a code that generates a list of file names from a torrent.
<?
require 'system/functions/functions.benc.php';
$dict = bdec_file('public/test.torrent', (1024 * 1024) );
if(is_array($dict)){
foreach($dict['value']['info']['files']['value'] as $file){
$length = $file['value']['length']['value']; // размер
$filename = $file['value']['path']['value'][0]['value']; // имя файла
}
}
?>
<?
foreach($dict['value']['info']['files']['value'] as $file){
$length = $file['value']['length']['value']; // размер
$filename = $file['value']['path']['value'][0]['value']; // имя файла
}
?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question