PHP: cannot declare class because the name is already in use

前端 未结 6 916
南方客
南方客 2020-12-29 19:14

I have 5 scripts:

  1. database.php
  2. parent.php
  3. child1.php
  4. child2.php
6条回答
  •  [愿得一人]
    2020-12-29 19:20

    Another option to include_once or require_once is to use class autoloading. http://php.net/manual/en/language.oop5.autoload.php

提交回复
热议问题