Add external libraries to Symfony2 project

前端 未结 2 729
忘了有多久
忘了有多久 2021-02-09 20:41

I am trying to add an external library (PHP Simple DOM Parser, http://simplehtmldom.sourceforge.net/index.htm) to a Symfony2 project. I took a tutorial that explains how to incl

2条回答
  •  一个人的身影
    2021-02-09 20:58

    You're trying to register a namespace but your class has no namespace. Try adding a namespace to it or use RegisterPrefixes().

    BTW: did you know that one of the Symfony components is basically doing the same thing as php simpledom? It's called DomCrawler and it has a support for both xpath and CSS selectors.

提交回复
热议问题