0

Hello,

With PHP I've saved all my website settings in one file e.g

'baseUrl' => 'http://localhost/thisSite',
'resources' => '../Resources/',  
'templates' => '../Resources/TPL/',

This makes the site very portable. I simply make changes to this one file and
I can move the site to any server.

But I how can I do this with javascript and ajax?
right now I am embedding all the absolute urls in the ajax calls.
As the site grows it will become harder to move it around.
How would you guys solve this issue? Many thanks in advance.

2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by ryy705
0

Thank you for your reply.

Yes and No. The directories will later move to a different location(outside the webroot on a linux server).

And again, when that happens I just have to make changes to one file and the all the php code will work.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.