Jump to content

Question About Ajax php Files


jimmyoneshot

Recommended Posts

In my system I have a collection of php files which handle the requests from my ajax e.g. I have a function which lets users "subscribe" to another user's posts "userConnect()" and another function which lets a user uprate another user's post "uprate()"

 

At the moment the uprate() function uses ajax to pass it's data to a file called "ajax_uprate.php" and the userConnect() function similarly passes it's data to a file called "ajax_userConnect.php".

 

Would I be better to combine these files into one global ajax.php file or is it better to keep them seperate? Basically I am wondering because at the moment I have a tonne of ajax_XXX files for every single function, each containing a very small amount of code. My thinking was that the smaller these files are the faster these ajax processes would take place. Am I right in thinking this or not?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.