Show DevBest [PHP] MewFramework [/PHP]

Xenous

o shi
Nov 15, 2011
383
101
I've recently gotten back into to PHP and decided to try and make a framework, it's pretty basic and doesn't offer to much in the way of features etc. But it should be good for learning.
It uses PDO for database access and RainTPL for templating.
Ps. Let me know if anything needs fixing or if I've missed anything.
Requirements:
MySQL
PHP 5.3 + (I think)
Xampp (not sure if it will work on iis)

How to set up:
1. Make database and run the query below.
2. Configure the rest in config.ini
3. It should work now!

Don't trust, don't download!


[SQL Query for Helpers table]
Code:
--
-- Table structure for table `helpers`
--
 
DROP TABLE IF EXISTS `helpers`;
CREATE TABLE IF NOT EXISTS `helpers` (
  `id` int(255) NOT NULL AUTO_INCREMENT,
  `helper_name` text NOT NULL,
  `helper_class_name` text NOT NULL,
  `helper_file_name` text NOT NULL,
  `helper_target_file` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

[Screenshots]
qa1QjNw.png
8d2YJWQ.png
KT87DlG.png
 

Sysode

Front-End Developer
Dec 11, 2012
1,673
848
This seems confusing to me as I don't do much PHP. Either way, I'm sure this will help others who are learning this.
 

Markshall

Русский Стандарт
Contributor
Dec 18, 2010
2,637
2,389
Nice work but I don't see myself using it. Also, it's nothing major but it's just a nifty little tip:

Most MySQL server ports are set to 21, so in Application/Classes/Database.php you have this line:

PHP:
public function __construct($Host, $User, $Pass, $Data, $Port)

Which means people have to do something like this:
PHP:
$DB = new Database('host', 'user', 'pass', 'database', 21);

If you do this:
PHP:
public function __construct($Host, $User, $Pass, $Data, $Port=21)

It sets $Port to 21 by default meaning people aren't required to enter a port unless it is different from 21, so they can initialise the database by doing this:
PHP:
$DB = new Database('host', 'user', 'pass', 'database');

I'm not sure if you already know about that, but I find it handy.
 

Xenous

o shi
Nov 15, 2011
383
101
Nice work but I don't see myself using it. Also, it's nothing major but it's just a nifty little tip:

Most MySQL server ports are set to 21, so in Application/Classes/Database.php you have this line:

PHP:
public function __construct($Host, $User, $Pass, $Data, $Port)

Which means people have to do something like this:
PHP:
$DB = new Database('host', 'user', 'pass', 'database', 21);

If you do this:
PHP:
public function __construct($Host, $User, $Pass, $Data, $Port=21)

It sets $Port to 21 by default meaning people aren't required to enter a port unless it is different from 21, so they can initialise the database by doing this:
PHP:
$DB = new Database('host', 'user', 'pass', 'database');

I'm not sure if you already know about that, but I find it handy.
I did know, but thankyou. I also had the port configurable due to that.
 

Users who are viewing this thread

Top