CakePHP - dynamically change core.php variable 'imageBaseUrl' -
In the KPPHP app, I have a model discount I want each account to have its subfolder in the WebTut / IMG folder . I can not make any problem to the subfolder
The challenge is the universal identity that is the current default path. I can get the account ID from AUTH.User.account_id.
Rather than modifying the IG path in every scene, where is the need to start Auth.User.account_id, I thought it would be better to dynamically convert the original image path to the core.ff file By changing it and changing 'imageBaseUrl' from there, so that it is available in the entire app.
However, I have not found any documents about bringing variables into the core.php file. I understand that this is a file that is possible to distribute the app in the variable, maybe this is not possible.
I've tried to configure Configure :: Write Values as shown below, but it does not seem to be read in the Core.php file.
Web path for public image directory under webbrot. * If 'IMG /' is not set to default, configure: * Configure ('APIImage URL', 'IMG /'.): * Write ('Imaginary'). '/');
Is there some way to bring a variable in the core? Php file, or maybe another way that could dynamically change the path dependent on application variables?
You must App.imageBaseUrl as necessary in your
. 'S AppController
Can change the value of The first renderer ()
callback does not need to change before that point, because the value is only required in the sequences. Plus you have the session component available.
Comments
Post a Comment