How should I organize my ajax actions files

200 Views Asked by At

I would like to know what's the best way to organize my php project with ajaxActions files.

At the moment I have a few ./process/ajaxAction_pagename.php files containing my actions like this:

if ($action=="actionName")
{
//code
}

I'm just wondering if there is a better (or more standard) way to do it.

1

There are 1 best solutions below

0
On BEST ANSWER

How about using an minimal mvc framework to handle your actions? Checkout: Cupcake php framework it needs documentation but it's really minimal.