best practice to use action url while calling ajax in cakePHP

后端 未结 5 1376
失恋的感觉
失恋的感觉 2020-12-28 11:00

I am using ajax with jQuery in my cakePHP application.
and my javascript function is placed inside a javascript file.

now in my local system the files are kept

5条回答
  •  [愿得一人]
    2020-12-28 11:38

    What to do is in your master template for your cake app create a global javascript variable that can be used throughout your application. Make sure it exists befor you do any JS includes too.

    
        ...
        
        ...
        
    
                                     
                  
提交回复
热议问题