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 [...]
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
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
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
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 = [...]
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 [...]
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-(
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
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 [...]
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!


Recent Comments