Exemple #1
0
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 **/
/*
|--------------------------------------------------------------------------|
| Carga automática Clases
|--------------------------------------------------------------------------|
*/
function Autocarga($NombreClase)
{
    if (is_readable(CLASE . strtolower($NombreClase) . '.clase.php')) {
        require_once CLASE . strtolower($NombreClase) . '.clase.php';
    } else {
        echo 'No existe la clase ' . $NombreClase;
    }
}
spl_autoload_register("Autocarga");
//Instanciar Clases
$db = new Conexion();
$usuario = new Usuario();
$enlace = new Enlace();
$sistema = new Sistema();
$validar = new Validacion();
// Reporte de errores
$sistema->ReportarError();