Josh Time | Joshua Li

TAG | PHP

PHP5.3 comes out with a new anonymous function feature. This new feature adds a lot of new flexibility to PHP scripts. What caught my eye more is that a function can be stored inside a variable. Normal functions can not be unset. This is usually fine. But, when inplementing a plugin system to a php [...]

· · · ·

This is my first real PHP tutorial on this blog. I hope you enjoy it. Level: Easy Ending result: Item 1 | Item 2 | Item 3 | Item 4 Sometimes, a script may want to add a separator between items in a list. This is not as simple as it seems though. In this [...]

· · ·

Sometimes, a PHP script may want to keep track of how many times the page has been viewed. The normal solution would be to do: mysqli_query(“UPDATE `table` SET `views`=`views`+1 WHERE `page`=5″); But, what if your site gets very high traffic? Then, the MySQL would be overloaded. A fix to this would be to use a [...]

· · · · · ·

Jan/10

9

Faster alternative to settype()

I was working on Coal Games today and then I looked up settype. michaltrutman wrote this on http://php.net/manual/en/function.settype.php. You can change variable type also in another way instead of using function settype(). You can change variable type also in another way instead of using function settype(). <?PHP $a = ’125′; //$a is string var_dump($a); $a [...]

· ·

Jan/10

3

Finally! A good PHP email validation

While I was writing Coal Games Project, I needed an email validation function. I searched through many different sites to find a good solution. Some were overkill and made a whole class and sloppy coding. Others did not validate 100% correctly. Finally, I found the right solution: http://www.dominicsayers.com/isemail/. Everything is wrapped up into a nice [...]

· ·

While I was coding today, I tried to use the function mysqli_fetch_all on my PHP 5.2 installation. Unfortunately, this function only works on PHP 5.3 and above since it uses the new mysqlnd driver. I had to come up with a pseudo alternative to the function mysqli_fetch_all. The following is the code I came up [...]

· · · · · ·

Dec/09

14

Coal Games Project and WordPress

For the last month or so, I have been working with WordPress a lot. I have originally thought of making my script have the same architecture as WordPress (three folders, public stuff in wp-content, hidden stuff in wp-includes, admin stuff in wp-admin) except instead of wp, it will be cg and I will try to [...]

· · ·

This is an ongoing review of the pros and cons of different parts of WordPress. This is a review of upgrading WordPress, only a specific part of WordPress. To view the index of my reviews of WordPress’ Pros and Cons: http://joshtime.com/reviews/wordpress/ Introduction Like most computer programs, WordPress also has updates which adds better functionality to [...]

· · ·

Dec/09

3

My Favorite PHP Scripts

PHP is my favorite programming language because it is really easy to use (for me at least). My two favorite PHP scripts that I did not make are WordPress and MyBB. Why? Ill explain.

· ·

This is an ongoing review of the pros and cons of different parts of WordPress. This is a review of installation, only a specific part of WordPress.
To view the index of my reviews of WordPress’ Pros and Cons: http://joshtime.com/reviews/wordpress-review-pros-and-cons/
Introduction
WordPress comes with a fully automated installer. The only preparation needed for installing WordPress is to set up the database information (username, password, database, host) and copying the files to the directory in which you want to install it. Installing Wordpress is very simple and is very intuitive but may be too simple.

· · ·

Older posts >>

Theme Design by devolux.nh2.me