ThinkPHP introduces file problems.

Source: Internet
Author: User
ThinkPHP introduces file problems. These files are introduced into the action, which is the directory structure of the file. they were not problematic in the previous Native call and execution.
The tp method cannot be found. You cannot use import later. please help.


Reply to discussion (solution)

Row 3, 'dirname (_ FILE _)/protocol'
Do you think _ FILE _ can be parsed in strings? Split into dirname (_ FILE _). '/protocl'

Failed to import file path. check the imported file

The import parameter is incorrect, and the file placement does not comply with the import conventions.
You can continue to use require, although it does not comply with the TP specification.

Because you did not mention an error when instantiating an object, you can assume that the instantiation is successful.
So it can be presumed that the instantiation statement is included in the embedded file.

The cause of the Call to a member function... error is that the instantiated object is global and cannot be used directly in the tp method (this is a basic variable scope problem)

Row 3, 'dirname (_ FILE _)/protocol'
Do you think _ FILE _ can be parsed in strings? Split into dirname (_ FILE _). '/protocl'


Well, I didn't see this problem before, but I cannot change it.

The import parameter is incorrect, and the file placement does not comply with the import conventions.
You can continue to use require, although it does not comply with the TP specification.

Because you did not mention an error when instantiating an object, you can assume that the instantiation is successful.
So it can be presumed that the instantiation statement is included in the embedded file.

The cause of the Call to a member function... error is that the instantiated object is global and cannot be used directly in the tp method (this is a basic variable scope problem)


                include 'Ice.php';include 'ZXINSserver.php';include 'protocl/ZXINUserInfoServant.php';$iceGridDefaultLocator='ZXIceGrid/Locator:default -h 192.168.1.61 -p 1201 -t 1000:default -h 192.168.1.160 -p 1201 -t 5000:default -h 192.168.1.61 -p 1102 -t 5000';$initData = new Ice_InitializationData;$initData->properties = Ice_getProperties();$initData->properties->setProperty("Ice.Default.Locator", $iceGridDefaultLocator);$communicator = Ice_initialize($initData);try{    //$p = $communicator->stringToProxy("ZXINStatusServant:tcp -h 192.168.1.60 -p 1111 -t 5000");    $p = $communicator->stringToProxy("ZXINUserInfoServant");    $user = ZXIN_ZXINUserInfoServantPrxHelper::checkedCast($p);

The ice middleware is used. it is okay to use the native middleware. now the 500 server is displayed.

The error message indicates that you have called stringToProxy with an empty object, indicating that you have not instantiated an object and see which row of the file contains the error.

Use the include prompt: Class 'Ice _ initializationdata' not found, $ initData = new Ice_InitializationData;

Ice_InitializationData. this is from ice. php.

class Ice_InitializationData{    public function __construct($properties=null, $logger=null)    {        $this->properties = $properties;        $this->logger = $logger;    }    public $properties;    public $logger;}

The Class 'Ice _ initializationdata' not found does not find this Class. Is there a problem with the include path? is the Class file name correct?

The Class 'Ice _ initializationdata' not found does not find this Class. Is there a problem with the include path? is the Class file name correct?


Make sure the import is correct, and the file names in the path are correct. The directory structure is on the first floor.

Change the path above to absolute path

Vendor ('Ice ');
Vendor ('zxin. zxinsserver ');
Vendor ('zxin. zxinuserinfoservant ');
I now put all these dependent files in Extend \ Vendor, and the page displays error 500.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.