07-26-2023, 10:16 PM
i am trying to get admin url and admin dir from a module.
Can you give an example finding admin url and admin dir from a module php page?
<?php
define('PS_ADMIN_DIR', dirname(__file__) . '/../../testadmin');
echo PS_ADMIN_DIR;
this code gives me
/home/myaccount/public_html/modules/suppliers/../../testadmin
i was expecting to get
/home/myaccount/public_html/testadmin
Any ideas?
Can you give an example finding admin url and admin dir from a module php page?
<?php
define('PS_ADMIN_DIR', dirname(__file__) . '/../../testadmin');
echo PS_ADMIN_DIR;
this code gives me
/home/myaccount/public_html/modules/suppliers/../../testadmin
i was expecting to get
/home/myaccount/public_html/testadmin
Any ideas?