ajaxboy / cjax

Lightweight Ajax Framework built in PHP with no foot-print. Allows you to build ajax functionality with a single line of code & do so much more, right from the back-end!
http://cjax.sourceforge.net/
66 stars 27 forks source link

CJAX only works if accessing file in the same directory as ajax.php #17

Open HallofFamer opened 9 years ago

HallofFamer commented 9 years ago

Well I am trying to build a website that uses pretty URLs(or search-engine friendly urls), in which old urls such as /profile.php?user=1 becomes /profile/user/1. But it seems that if I have more than one forward slashes in the request URI, CJAX will stop working. I believe CJAX assumes that each forward slash means a directory separator, so the javascript include path is messed up. I notice that if I move a php file to a subdirectory, rather than in the same directory as ajax.php, it will also make CJAX stop functioning. Now the question is, how can I fix this?

goosehub commented 9 years ago

CodeIgniter 2 is released, is very similar to Codeigniter 1, and no longer needs cjax to make using ajax easy. Doesn't resolve the issue for the repository, but perhaps it does for you.

HallofFamer commented 9 years ago

@goosehub Do you even understand what you are talking about? Dont make stupid assumptions. I use CJAX for my own project, which is irrelevant to CodeIgniter. Also CJAX is very useful for writing AJAX code in well-organized fashion, even with CodeIgniter 2.

goosehub commented 9 years ago

My mistake. I was under the incorrect impression this was a repo specific to Codeigniter. My apologies. I was trying to be helpful. Please refrain from brash language.