The code I’m working with has a strange URL naming convention, and I’m not sure how it works.
var url = "##SITE_URL##user/validate_username";
This url calls the PHP function ‘validate_username’ located inside user_php_files! I’m not sure how it works.
In the configuration
define("SITE_URL",'http://'.SITE_DOMAIN_NAME);
I tried creating a PHP function called ‘create_username’ inside the same user_php file and then using AJAX to call it (with the same naming convention)
$.post('##LBL_SITE_URL##user/create_username',{id:1},function(res) {...
But the function is not even called.
Why is there the ## sign? And how does it call a function from inside the PHP script?
My guess is that’s some sort of template and someone is using a string replace to search for ##SITE_URL## to be replaced by the actual URL.