Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Software Development
Programming
[PHP] MewFramework [/PHP]
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Markshall" data-source="post: 207395" data-attributes="member: 1872"><p>Nice work but I don't see myself using it. Also, it's nothing major but it's just a nifty little tip:</p><p> </p><p>Most MySQL server ports are set to 21, so in <em>Application/Classes/Database.php</em> you have this line:</p><p> </p><p>[php]public function __construct($Host, $User, $Pass, $Data, $Port)[/php]</p><p> </p><p>Which means people have to do something like this:</p><p>[php]$DB = new Database('host', 'user', 'pass', 'database', 21);[/php]</p><p> </p><p>If you do this:</p><p>[php]public function __construct($Host, $User, $Pass, $Data, $Port=21)[/php]</p><p> </p><p>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:</p><p>[php]$DB = new Database('host', 'user', 'pass', 'database');[/php]</p><p> </p><p>I'm not sure if you already know about that, but I find it handy.</p></blockquote><p></p>
[QUOTE="Markshall, post: 207395, member: 1872"] 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 [I]Application/Classes/Database.php[/I] you have this line: [php]public function __construct($Host, $User, $Pass, $Data, $Port)[/php] Which means people have to do something like this: [php]$DB = new Database('host', 'user', 'pass', 'database', 21);[/php] If you do this: [php]public function __construct($Host, $User, $Pass, $Data, $Port=21)[/php] 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');[/php] I'm not sure if you already know about that, but I find it handy. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Software Development
Programming
[PHP] MewFramework [/PHP]
Top