Looking to include a path in a javascript to access a php file


I’m trying to include a link to a php file with no success.

If it was in PHP I would use something like $_SERVER[‘DOCUMENT_ROOT’] . ‘inc/filename.php.php’ to access the file but not sure how to accomplish this in javascript.

I have a test domain called testing.dev
under the testing.dev domain i have: /inc/location/get_province.php

Can’t seem to find a the right code and any help would be greatly appreciated.


function getProvince(val) {
	type: "POST",
	url: "/inc/location/get_province.php",
	success: function(data){

What errors are you getting? I don’t see anything wrong here.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.