Update: fixed Mysql Class
Most websites that use php mostly use MySql, People use it because it’s dynamic, fast(in most cases) and popular.
But most of you don’t know that there’s also something called “Sqlite” it’s also an Sql database, but it stores the database in a file.
Problem
There are two main problems with using mysql and sqlite these days:
- To switch between mysql and sqlite you have to go and replace mysql_query with sqlite_query in every file that uses mysql.
- If your’e obfuscating your code then you can’t obfuscate functions.
- If you want to process some code or an sql query before each time a mysql or an sqlite function is run like counting the number of queries in a page, and a lot of other uses.
There are a lot of inconvenience when using mysql or sqlite functions, everyone with their own problems, and this should help you solve most of them.
Read more…
admin mysql, php, sqlite mysql, php, sqlite
Even though the subject of “Using templates in php” is everywhere, it still didn’t reach it’s true potential.
Most people who are new to php(not sure about more advanced php developers) use methods like this to put templates in their website:
1
2
3
| < ?php
include 'header.txt'; // A simple include
?> |
As you can see it’s not very sophisticated, and you can use it only with normal HTML files.
People who are more advanced use this:
1
2
3
| < ?php
include 'header.php';
?> |
It’s almost the same as the first one, only that you can also put in there PHP code.
The problem with all of those is that as more parts in your template you have the more files your’e going to need.
So if you have three parts like:
head
menu
footer
Then your’e going to need three files:
head.php
menu.php
footer.php
And the more parts the more the files to maintain, So if you’ll need to change one of those file’s name on a 100 paged website your’e doomed.
So what I came up with about one year after I learned php is using one file for all your templating needs.
Read more…
admin php php, tutorial
New release with a lot of fixes, complete recode and new icons.
a full change log can be found in the os itself:
http://shedokan.110mb.com/os/
I added a login interface but due to problems with the register interface all users are automatically logged in the guest user.
in future releases you will be able to rename and create your own files, in your own accounts.
admin Uncategorized
Comments