Are you calling it with "new DomDocument" or "new \DomDocument"? Since DomDocument is in the Root Namespace, you have to add the "\" at the beginning or define DomDocument using the "use \DomDocument;" statement.
If that's not the case, please show us some code. (http://gist.github.com) Am Freitag, 13. Februar 2015 05:23:05 UTC+1 schrieb HVan: > > Any reason why DOMDocument doesn't work in a CakePHP controller? It says > class not found. If I move the new DOMDocument code into a standalone php > file and put it in webroot, it works fine. > > How do I use DOMDocument inside a controller/model? > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
