Laravel 5.1 PHP DOMDocument() class not found
發表於 : 2016-09-09 09:04:01
http://stackoverflow.com/questions/3157 ... -not-found
In Laravel 5.1 you must prefix the class name with the global namespace prefix '\'.
So your updated code:
In Laravel 5.1 you must prefix the class name with the global namespace prefix '\'.
So your updated code:
代碼: 選擇全部
<?php
namespace App\Http\Controllers\III_Ranks;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
class RanksController extends Controller
{
public function getRanks()
{
$list1 = new \DOMDocument();
//etc...
}
}