Hello,
I am trying to use:
include_once(Registry::get('config.dir.schemas') . 'literal_converter/utf8.functions.php');
with function fn_simple_encode_str($str)
But it always throws error, Class 'Tygh\Registry' not found
What is wrong?
Hello,
I am trying to use:
include_once(Registry::get('config.dir.schemas') . 'literal_converter/utf8.functions.php');
with function fn_simple_encode_str($str)
But it always throws error, Class 'Tygh\Registry' not found
What is wrong?
Add
use Tygh\Registry;
under the first line in your php file:
Yes I have it but still comes error
Fatal error: Uncaught Error: Class 'Tygh\Registry'
include_once(Registry::get(‘config.dir.schemas’) . ‘literal_converter/utf8.functions.php’);fn_simple_encode_str(‘test’);
Hello
Is this script called from the controller or do you have it in the root of the store ?
Best regards
Robert
Please provide us with the full path to the file
the file encode.php is in the root of the store
Hello
You should add on the start script, before use Tygh\Registry;
define('AREA', 'C');
Please try
use Tygh\Registry;define(‘AREA’, ‘C’);
require dirname(FILE) . ‘/init.php’;
include_once(Registry::get(‘config.dir.schemas’) . ‘literal_converter/utf8.functions.php’);
fn_simple_encode_str(‘test’);
thank you guys, works perfect.
Hello
You are welcome :)
Best regards
Robert