PHP use class in global namespace

前端 未结 5 1485
长情又很酷
长情又很酷 2021-01-21 18:18

I have a DB wrapper class that uses PDO and in the constructor I create a PDO object. The wrapper class is in our namespace and we are using an autoloader. The issue is that the

5条回答
  •  醉酒成梦
    2021-01-21 19:05

    This works, your problem is elsewere.

    index.php

    _db.php

    Handle = new PDO;
        }
    }
    

提交回复
热议问题