0
PHP를 사용하여 XML 파일을로드합니다. 보기를 통해 페이지 매김을 할 수 있습니까?Laravel 4 PHP 내부 페이지 매김
다음은 내가 사용하는 코드입니다. XML 파일에서 이름을 가져 오면 페이지 매김을해야합니다.
@extends('base')
@section('title', 'Monsters')
@stop
@section('main')
<div class="container">
<div class="doc-content-box">
<legend>Monsters</legend>
<?php
$monstersdir = 'C:\Users\E1\Desktop\theforgottenserver-v0.2.15-win64console\Mystic Spirit\data\monster';
if(is_dir($monstersdir)) {
$list = simplexml_load_file($monstersdir.'\monsters.xml');
?>
<table class="table table-striped table-condensed table-content">
<tbody>
<?php
foreach($list as $monster) {
if ($monster['name'] > null) {
echo '
<tr>
<td style=""><a href="">'.$monster['name'].'</a></td>
</tr>';
}
}
}
else{
echo '<div class="alert alert-danger"><span class="label label-important">Error parsing your Monsters XML file</span><br /><br /> Invalid path!</div> ';
}
?>
</tbody>
</table>
</div>
</div>
@stop
어떤 힌트를 : 나는 내가 사용 ->paginate();
laravels를 사용할 수 있을까요? 정말 필요합니다. : P