Post: Basic PHP error checker
07-15-2012, 04:04 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); Just created it, very basic, and self explanatory Smile Want more scripts? Just ask

    <?php

class iSystem
{
var $errors = array();

function debug($enabled)
{
if ($enabled == '1'Winky Winky {
error_reporting(E_ALL);
ini_set('display_errors', 'On'Winky Winky;
} else {
error_reporting(0);
ini_set('display_errors', 'Off'Winky Winky;
}
}

function error($error_num)
{
$this->errors[] = "Username invalid";
$this->errors[] = "Password Invalid";
$this->errors[] = "Email Taken";
$this->errors[] = "Username taken";
echo $this->errors[$error_num];
}
}
$system = new iSystem();
//Do you want to show errors? Debug mode? 1 = on / 0 = off
$system->debug(1);
//You can use this for error testing -- use try and catch please, kthnxbye :
$username = "rodney";

try {
if ($username != "wrong") {
throw new Exception($system->error(1));
}
}

catch (exception $e) {
echo $e->getMessage();
}


?>
(adsbygoogle = window.adsbygoogle || []).push({});
07-19-2012, 12:06 AM #2
This is very impressive nice job man ! Also I thino you should replace line 5 with public instead of var because its more relevant to PHP I guess. Anyway good job dude.
07-19-2012, 12:52 AM #3
what do i do with this?:O I want to try some php lol
07-19-2012, 09:54 AM #4
Originally posted by LEzStarz View Post
This is very impressive nice job man ! Also I thino you should replace line 5 with public instead of var because its more relevant to PHP I guess. Anyway good job dude.


Thanks man Smile And when you're on skype let's chat

Originally posted by McToasted View Post
what do i do with this?:O I want to try some php lol


Upload it Smile Read the comments it's self explanatory.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo