I'm working in a framework where not all the pages are the same relative path from the asset directories, so they often use a WWW variable to get the correct path to css, php, js files etc.
I'm setting up a form that submits via ajax, and for the url path to work, it will have to be an absolute path, but based on a variable ideally for maintainability.
Since that WWW variable is already set up in the php, I was thinking about including a php page with <script> tags and that way I can use the same variable..
Is that considered really kludgy? or is there another way to do it? Ideally I want to have all the config just in one file to make it more easily portability, which is why I don't just have a js file with the path. So if there's some way to autogenerate it or something...