PHP:Class not call

Question

I've a class called parser located in Data\Dictionary and i call it to transform a string to object using this function:

Use Data\Dictionary\Parser as Parser;
function loadDictionary($conn) {

    $dictText=DictionaryAsTextString($conn);
     $parser = new Parser();

    try {
        $dict=$parser->parseDictionary ($dictText);

    } catch ( \Exception $e ) {
        echo "Erreurs";

    }
    return $dict;
}       

However, it display this message:

( ! ) Fatal error: Uncaught Error: Class 'Data\Dictionary\Parser' not found in C:\wamp64\www....\index.php on line 65 ( ! ) Error: Class 'Data\Dictionary\Parser' not found in C:\wamp64\www...\index.php on line 65

Please any help!


Show source
| class   | php   2017-01-06 19:01 0 Answers

Answers ( 0 )

◀ Go back