현재 내 laravel 사이트에서 오류가 발생했습니다. 나는 다음과 같은 코드를 사용하고 있습니다 : 그 foreach 문에서Laravel 4/SimpleXML/PHP 노드가 존재하지 않습니다.
@extends('base')
@section('title', 'Experience stages')
@stop
@section('main')
<div class="container">
<div class="doc-content-box">
<legend>Experience stages</legend>
<?php
$stagesdir = 'C:\Users\E1\Desktop\theforgottenserver-v0.2.15-win64console\Mystic Spirit\data\XML';
if(is_dir($stagesdir)) {
$list = simplexml_load_file($stagesdir.'\stages.xml');
?>
<table class="table table-striped">
<thead>
<tr>
<th>From Level</th>
<th>To Level</th>
<th>Experience multiplier</th>
</tr>
</thead>
<tbody>
<?php
foreach($list->children() as $stage) {
if ($stage['maxlevel'] == '') {
$stage['maxlevel'] = '*';
}
echo '
<tr>
<td>'.$stage['minlevel'].'</td>
<td>'.$stage['maxlevel'].'</td>
<td style="width: 30%">'.$stage['multiplier'].'x</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
을, 나는 $list->world->children()
을 사용하는 wan't하지만 나를 위해 작동하지 않습니다. 내 페이지를 실행하려고하면, 나는 다음과 같은 오류 얻을 : 내 XML 파일에 참조로 http://paste.laravel.com/Koh이
내가 다음 ->world
없이 사용하지만 수 : 또한
main(): Node no longer exists
을, 여기 내 XML 파일입니다 내 테이블에 <td>
처럼 작동합니다.
누구입니까? 부디? : P –
어떤 줄 (번호 또는 코드)에서 오류가 발생합니까? –