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
https://forums.phpfreaks.com/topic/252961-question-about-ajax-php-files/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.