Bagi yang pernah gabungkan Xampp dengan Joomla dalam satu mesin, mungkin pernah mendapatkan pesan error sbb:
“Warning: cannot yet handle MBCS in html_entity_decode()! in D:\xampp\htdocs\myjoomla\libraries\joomla\application\pathway.php on line 209″.
Solusinya, Anda tinggal cari dan edit file yg bermasalah tersebut yg dalam hal ini adalah file pathway.php dan langsung ke baris 209.
Pada baris 209, gantilah script [...]

Continue reading about warning: cannot yet handle MBCS in html_entity_decode pada pasangan Joomla dan Xampp

dgtola on December 10th, 2009

How can a line break be used within HTML? That’s easy: with the <br /> HTML element. However, what if there is data with \n or \r\n line breaks? Search and replace comes to mind; however, it is much easier to use a built-in PHP function: nl2br(). This parses a string and converts all line [...]

Continue reading about Manipulating Strings: Using Line Breaks

dgtola on November 1st, 2009

You want to reverse the words or the characters in a string.
Solution

Use strrev( ) to reverse by character:
print strrev(’This is not a palindrome.’);
.emordnilap a ton si sihT
To reverse by words, explode the string by word boundary, reverse the words, then rejoin:
$s = “Once upon a time there was a turtle.”;
// break the string up into words$words = explode(’ ‘,$s);
// reverse the array of [...]

Continue reading about Reversing a String by Word or Character

dgtola on October 2nd, 2009

You need to process each character in a string individually.
Solution

Loop through each character in the string with for. This example counts the vowels in a string:
$string = “This weekend, I’m going shopping for a pet chicken.”;
$vowels = 0;
for ($i = 0, $j = strlen($string); $i < $j; $i++) {
if (strstr(’aeiouAEIOU’,$string[$i])) {
$vowels++;
}
}
Discussion

Processing a string a character at a time is an easy way to calculate the “Look and Say” sequence:
function lookandsay($s) [...]

Continue reading about Processing a String One Character at a Time

dgtola on September 30th, 2009

You want to replace a substring with a different string. For example, you want to obscure all but the last four digits of a credit card number before printing it.
Solution
Use substr_replace( ):
// Everything from position $start to the end of $old_string
// becomes $new_substring
$new_string = substr_replace($old_string,$new_substring,$start);
// $length characters, starting at position $start, become $new_substring
$new_string = [...]

Continue reading about Replacing Substrings

dgtola on September 30th, 2009

You want to extract part of a string, starting at a particular place in the string. For example,
you want the first eight characters of a username entered into a form.
Solution
Use substr( ) to select your substrings:
$substring = substr($string,$start,$length);
$username = substr($_REQUEST['username'],0,8);
Discussion
If $start and $length are positive, substr( ) returns $length characters in the string, starting at [...]

Continue reading about Accessing Substrings

dgtola on August 12th, 2009

Karena ssesuatu dan lain hal, kadang kita sampai lupa password, apalagi jika sudah banyak password yang beredar dipikiran.
Kali ini yang saya lupa adalah password web yang dibangun dari Joomla 1.0… kwwkwk… kww… ww 8-(

Continue reading about Lupa password Joomla 1.0

Bagi pemakai XAMPP, mungkin pernah mendapati pesan eror seperti ini:
Fatal error: Maximum execution time of 60 seconds exceeded in D:\xamp\xampp\htdocs\pajak\system\database\drivers\mysql\mysql_result.php on line 168…
Untuk mengatasinya, Anda tinggal edit file php.ini baru restart kembali xampp Anda. Yang jadi masalah biasanya adalah php.ini yang mana? karna di xampp ada beberapa php.ini.
php.ini yang betul adalah yang di C:\xampp\apache\bin\php.ini (ini [...]

Continue reading about Fatal error: Maximum execution time of 60 seconds pada Xampp

dgtola on April 25th, 2009

PHP adalah singkatan dari PHP Hypertext Preprocessor. Merupakan bahasa pemrograman script di sisi server (server-side), script yang ditempatkan pada server dan diproses juga pada server, sedangkan client hanya tinggal menerima hasil pemrosesan tersebut.
PHP dibuat oleh Rasmus Lerdorf pada tahun 1995, sejak awal didesain untuk membentuk sebuah web yang dinamis. Situs resmi PHP ada di http://www.php.net.
Dengan [...]

Continue reading about PHP, sebuah pendahuluan

dgtola on April 8th, 2009

Xampp / Lampp, bagi saya adalah aplikasi portable web-server yang terdiri dari Apache, PHP, MySQL, dan lain-lainnya. Sangat bagus digunakan sebagai web-server sebelum dipasang pada server web yang sesungguhnya.
Xampp (kalo di Linux namanya Lampp) dapat berjalan dengan baik pada Linux dan Windows, Mac juga juga bisa!

Continue reading about Install Xampp pada Ibex dan Jaunty