I have a CakePHP project with this structure:
myrootapp
|__ app
|__webroot
|__soap.php
I'm calling my webservice in this soap.php, but I am calling some cakephp controller inside of my webservices functions like this link.
But the App::import causes an error in my application because the App::import is not imported into soap.php.
How I can import and use the CakePHP function in my soap.php page inside the webroot folder? I want to use App::cakephpFunctions to import the controllers.
** UPDATE**
I'm calling App:import inside the soap.php in webroot. I wanna solve this and call my controllers in this file.
PHP Fatal error: Class 'App' not found in
Thanks.
In order to use stuff from the framework, you need to load/initialize it first. You can do that by including the CakePHP bootstrap file into your soap.php file:
require_once('/path/to/your/cakephp/lib/Cake/bootstrap.php');
That will initialize the framework, including the App class.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With