CodeIgniter Dritten Klasse nicht laden
Bin ich versucht zu implementieren Dashboard-widget-Klasse (gefunden hier: http://harpanet.com/programming/php/codeigniter/dashboard/index#installation), aber es gibt mir Fehler Unable to load the requested class
Ich habe versucht, fügen Sie diese Klasse in autoload sowie menually zu meinem controller $this->load->library('dash')
aber diese geben auch den gleichen Fehler.
Habe ich überprüft dash.php
gefunden und unten Methode private function __example__()
aber nicht verstehen können, was die Entwickler sagen im Kommentar.
class Dash
{
private function __example__()
{
/*
* This function is purely to show an example of a dashboard method to place
* within your own controller.
*/
//load third_party hArpanet dashboard library
$this->load->add_package_path(APPPATH.'third_party/hArpanet/hDash/');
$dash =& $this->load->library('dash');
$this->load->remove_package_path(APPPATH.'third_party/hArpanet/hDash/');
//configure dashboard widgets - format: type, src, title, cols, alt (for images)
$dash->widgets = array(
array('type'=>'oop', 'src'=>'test_dash', 'title'=>'Test OOP Widget', 'cols'=>3),
//if 'title' is set to FALSE, the title block is omitted entirely
//note: this is an 'html' widget but is being fed content from a local method
array('type'=>'html', 'src'=>self::test_method(), 'title'=>false, 'cols'=>3),
array('type'=>'file', 'src'=>'saf_inv.htm', 'title'=>'Safety Investigation'),
//multi-content widget - set widget title in outer array (also note use of CI anchor to create a link)
array('title'=>anchor('tz', 'TARGET ZERO'),
//sub-content follows same array format as single content widget
//'img' content can also have an 'alt' text
array('type'=>'img', 'src'=>'saf_tzout.gif', 'alt'=>'Action Completed'),
array('type'=>'file', 'src'=>'saf_tz.htm'),
array('type'=>'file', 'src'=>'ave_close.htm', 'title'=>'Average Time to Close')
),
array('type'=>'file', 'src'=>'saf_meet.htm', 'title'=>'Safety Meeting'),
array('type'=>'file', 'src'=>'saf_acc.htm', 'title'=>'Accident Investigation'),
array('type'=>'file', 'src'=>'saf_hazmat.htm', 'title'=>anchor('hazmat', 'HAZMAT')),
array('type'=>'file', 'src'=>'saf_cont.htm', 'title'=>'Loss of Containment'),
array('type'=>'file', 'src'=>'saf_worksinfo.htm', 'title'=>'Works Information'),
//an action widget - 'clear' will generate a blank widget with a style of clear:both
array('type'=>'clear'),
//multi-content widget - width can be set using the 'cols' param in outer array
array('title'=>'RAG Report', 'cols' => 2,
array('type'=>'file', 'src'=>'saf_rag.htm'),
array('type'=>'img', 'src'=>'ProcSaf.gif')),
array('type'=>'file', 'src'=>'saf_chrom.htm', 'title'=>'Chrome checks'),
);
//populate the view variable
$widgets = $dash->build('safety');
//render the dashboard
$this->load->view('layout_default', $widgets);
}
...................
} //end of Dash class
Installationspfad ist root/application/third_party/hArpanet/hDash/libraries/dash.php
Wie kann ich laden Sie diese Klasse, um mein system ein und verwenden Sie widgets?
CI_Dash
InformationsquelleAutor Code Lover | 2014-01-09
Du musst angemeldet sein, um einen Kommentar abzugeben.
Erstellen Sie eine Bibliothek auf, initialisiert die Dritte Klasse:
ZB:
--in der Bibliothek erstellen Sie eine Datei namens mydash.php --
laden Sie die Bibliothek mit:
dann sind Sie in der Lage, verwenden Sie die Dash-Klasse. Auch in der Lage, laden Sie die Bibliothek in autoload.
Danke...
InformationsquelleAutor ReNiSh A R
Tut mir Leid zu hören, dass Sie Probleme hatten, (ich habe gerade erst bemerkt, dass dieses SO Eintritt). Dank ReNiSh für seine workaround, sehr geschätzt.
Tun Sie nicht müssen jedoch zur Nutzung der Bibliothek Konzept zur Umsetzung der 'require_once' hDash. Ich habe jetzt geschrieben, eine Komplettlösung für immer hDash installiert und ausgeführt, die Sie hier finden können: http://harpanet.com/programming/php/codeigniter/dashboard/walkthrough
Beachten Sie auch, dass, wie von gestern, 3. Feb 2014, hDash wurde aktualisiert auf version 1.2.
InformationsquelleAutor Stackman
Bin ich mit dem PDF-Parser von http://pdfparser.org/
Ich Dateien erstellen application/libraries/pdf.php
Dann erstelle ich die Datei application\third_party\pdfparser.php
Letzten habe ich auch PDF-Parser-Bibliothek in Verzeichnis => application\third_party\pdfparser
Andy konnte Sie einen Blick auf meine Frage, PDFParser und CodeIgniter ? Ich habe versucht, Ihre Lösung, die von immer ärger... stackoverflow.com/q/41238075/2278301
InformationsquelleAutor user3713530