search

Home  >  Q&A  >  body text

php - Looking for help with the reference problem of TP3.2, what's wrong with what I wrote? What about displaying citation errors?

I imported it directly from the DEMO. Because it is multi-layered, I wrote it as above. The directory is as above. But when I new the class, why is a reference error reported? I haven’t moved the structure

Thanks for the advice!

phpcn_u1582phpcn_u15822757 days ago586

reply all(2)I'll reply

  • 巴扎黑

    巴扎黑2017-06-06 09:55:34

    Try new JsApiPay()

    reply
    0
  • ringa_lee

    ringa_lee2017-06-06 09:55:34

    According to system rules, the import method cannot import class library files with dots, because the dots will be directly converted into slashes. For example, if we define a file named User.Info.class.php
    , use :

    import("Org.User.Info");

    If loaded in

    , an error will occur, causing the loaded file not to be the Org/User.Info.class.php
    file, but the Org/User/Info.class.php file. In this case, we can use:

    import("Org.User#Info");

    Please read the document carefully, architecture => automatic loading

    reply
    0
  • Cancelreply