Ask Question in MZ User
5

Before you start your own framework

Posted August 17th, 2010 in Knowledgebase by saturngod

အခုတေလာ ရံုးမွာ framework ျပႆနာ ေတာ္ေတာ္ေလး ရႈပ္သြားတယ္။ အဲဒီေတာ့ ကိုယ္ပိုင္ framework တစ္ခု တည္ေဆာက္ျခင္းရဲ႕ ေကာင္းျခင္း မေကာင္းျခင္းေတြေတာ့ သေဘာေပါက္သြားတာေပါ့။ framework တစ္ခု တည္ေဆာက္ေတာ့မယ္ဆုိရင္ အခုေနာက္ပိုင္းကေတာ့ MVC pattern နဲ႕ ပဲ တည္ေဆာက္ၾကပါတယ္။ MVC Pattern အတြက္ တစ္ေယာက္နဲ႕ တစ္ေယာက္ approve မတူၾကဘူးဗ်။ ကၽြန္ေတာ္ကေတာ့ Symfony နဲ႕ CI ပဲ သံုးဖူးေတာ့ သူတုိ႕ ၂ ခု မတူညီတာကို သိတယ္။ ROR ကေတာ့ ေမ့သြားျပီလုိ႕ ဆိုလို႕ရမယ္။ ROR ကို ခဏေလာက္ပဲ လုပ္ဖူးတယ္။ ေနာက္ပိုင္း စာအုပ္က version နဲ႕ ထြက္တဲ့ version မတူတာနဲ႕ ေရွ႕မဆက္ျဖစ္ေတာ့တာ အခုထက္ထိပဲ။ အဲ... လြဲကုန္အံုးမယ္

Continue Reading »

2

Deprecated features in PHP 5.3.x

Posted July 22nd, 2010 in Knowledgebase, News, PHP by saturngod

PHP 5.3 မွာ သံုးလုိ႕မရေတာ့တဲ့ function ေတြပါလာပါတယ္။ ကၽြန္ေတာ္ေတာင္ ornagai မွာ split function သံုးထားတာကို ျပန္ျပင္လိုက္ရတယ္။ အဲလိုအခါေတြမွာ ဘာ function အစားထိုးရမလဲဆိုတာကို သိထားဖို႕လိုပါတယ္။ အဲဒီအတြက္လည္း php.net မွာ ညႊန္းဆိုထားျပီးသားပါ။ split အစား preg_split() ကို အစားထိုးသံုးရပါတယ္။ အျခား function ေတြလည္း အစားထိုးေျပာင္းလဲသံုးရတာေတြ ရိွပါတယ္။ deprecated လုပ္လုိက္တာလည္း ေကာင္းပါတယ္။ အခ်ဳိ႕ function ေတြ duplicate ျဖစ္ေနတာေတြရိွေနတယ္။ လိုလည္း မလိုေလာက္ဘူးထင္တာပဲ။ အခ်ဳိ႕ function ေတြက သံုးတဲ့လူေတာ္ေတာ္ ရွားပါတယ္။
Continue Reading »

0

Get Latest Exchange Price with PHP

Posted June 25th, 2010 in Knowledgebase by saturngod

ကၽြန္ေတာ္ေရးထားတဲ့ bot ကိုေတာ့ ပိတ္လိုက္ျပီ။ အဲဒီ bot အတြက္ ေရးထားတဲ့ service ေလးတစ္ခုရိွတယ္။ သို႕ေပမယ့္လည္း server loading တက္မွာဆုိးလို႕ မထည့္ေတာ့ပဲ ပိတ္လိုက္တာ။ ကၽြန္ေတာ္ http://www.naungmon.co.cc/ ကေန ေနာက္ဆံုး ေပါက္ေစ်းကို သိရေအာင္ PHP နဲ႕ ေရးလုိ႕ရပါတယ္။ ဥပမာ။။ website ကို သြားစရာ မလုိပဲ ေအာက္ကလို ျမင္ရမွာပါ။

SGD To Kyats

24 Jun
1SGD-- 715 Ks

Continue Reading »

4

subscriber count , follower count with PHP

Posted May 7th, 2010 in Knowledgebase by saturngod

subscriber count ကို feed burner ကေန ယူခ်င္တာနဲ႕ API ေလး စမ္းျဖစ္သြားတယ္။ feed burner api မလုပ္ခင္ api ကို allow လုပ္ေပးဖို႕လိုတယ္။

  1. login your feedburner and go to your feed.
  2. Go to Publicize tag
  3. Go to Awareness Api and active it.

Continue Reading »

3

Why need to develop own php framework ?

Posted May 4th, 2010 in Knowledgebase by saturngod

တကယ္လို႕ PHP developer တစ္ေယာက္က PHP ကို ကြ်မ္းက်င္ေနျပီလို႕ ယူဆရင္ေတာ့ php framework တစ္ခုေလာက္ ေဆာက္ၾကည့္သင့္တယ္။ phpframework ေတြက နည္းတာ မဟုတ္ဘူး ဘာလို႕ framework ေရးမွာလည္း။ သူမ်ား ေရးထားတာပဲ ယူသံုးမွာေပါ့လို႕ ဆိုေကာင္းဆိုမယ္။ ဟုတ္ပါတယ္။ http://www.phpframeworks.com/ မွာ ျပထားတဲ့ framework ေတြေတာင္ မနည္းပါဘူး။ ဒါဆိုဘာလို႕ ကိုယ္ပိုင္ PHP framework ေရးဖို႕လိုတာလဲ။ skill and knowledge အတြက္ပါ။

Continue Reading »

0

Glob

Posted April 30th, 2010 in Knowledgebase by saturngod

အရင္က image ေတြကို folder တစ္ခုေအာက္မွာထားျပီး အကုန္လံုး ဘယ္လို ဆြဲေခၚထုတ္ရမွန္းမသိျဖစ္ဖူးတယ္။ ေနာက္ျပီးေတာ့ library folder ထဲက php ေတြကို ဆြဲထုတ္တာလည္း မသိဘူးျဖစ္ေနတယ္။ အခုမွ သိတယ္။ glob ဆိုတဲ့ function ကို ေခၚလိုက္ရင္ ေတာ္ေတာ္လြယ္တာပဲ။

<?php
foreach (glob("*.txt") as $filename) {
echo "$filename size " . filesize($filename) . "\n";
}
?>

အရင္က မသိခဲ့လိုက္လို႕ ၂ ေၾကာင္းေလာက္နဲ႕ ျပီးမွဟာကို ရွည္ရွည္ ေဝးေဝးေတြ ေရးလိုက္ရေသးတယ္။ Image Gallery လိုမ်ဳိး site ေတြ , php file ေတြကို include နဲ႕ လွမ္းေခၚရတာမ်ားမယ့္ဟာေတြကို glob သံုးလုိက္ရင္ ေတာ္ေတာ္အဆင္ေျပတာပဲ။ ေနာက္ဆိုရင္ေတာ့ ေရးရတာ နည္းနည္းသက္သာျပီေပါ့။

PHP က function ေတြ အမ်ားၾကီးရိွေတာ့ အကုန္လံုးကို သိရင္ေတာင္ ဘယ္မွာ ဘယ္လိုသံုးရမလဲဆိုတာသိခ်င္မွ သိမယ္။ ဥပမာ။။ array_shift ဆိုတဲ့ function ကို ဘယ္မွာ သံုးရမွန္းမသိေပမယ့္ address segment ျဖတ္တဲ့ ေနရာမွာေတာ့ ေတာ္ေတာ္အသံုးဝင္တယ္။

0

Wow! PHP

Posted April 21st, 2010 in Knowledgebase by saturngod

ျပီးခဲ့တဲ့ တနဂၤေႏြက MZ 2.0 အတြက္ေရးရင္း ကိုယ့္ framework ကိုလည္း upgrade လုပ္ရင္း တစ္ခ်က္ခုတ္ ႏွစ္ခ်က္ျပတ္ အစီအစဥ္နဲ႕ ေတာ္ေတာ္ေလးကို လုပ္ျဖစ္သြားတယ္။  အဲမွာ ဘာကို သြားေတြ႕လည္းဆိုေတာ့ PHP function ေတြကိုပဲ။ framework တစ္ခု တည္ေဆာက္တဲ့အခါမွ ဘယ္ function ကို သံုးရင္ ေကာင္းမလဲ။ ဒီ code တကယ္ေရးဖို႕လိုလို႕လား။ ေနာက္ျပီး ဘယ္လို ေရးရင္ light weight ျဖစ္မလဲ စတာေတြကို စဥ္းစားလာရတယ္။ ကၽြန္ေတာ္ မသိေသးေပမယ့္ သံုးေကာင္းတဲ့ function အခ်ဳိ႕ PHP မွာေတြ႕လာရတယ္။ ေနာက္ျပီး array ပိုင္းနဲ႕ OOP ပိုင္းကို ပိုသေဘာက်လာတယ္။

Continue Reading »

1

Thnking about MZ 2.0

Posted April 7th, 2010 in News by saturngod

အခုတေလာ cassandra ကို ဖတ္ရင္းနဲ႕ MZ ကို cassandra နဲ႕ ေရးၾကည့္ခ်င္လာတယ္။ cassandra နဲ႕ project ေလး တစ္ခုေလာက္ လုပ္ခ်င္တယ္။ ဒါေပမယ့္ ဘာ project လုပ္ရမလဲ စဥ္းစားမရျဖစ္ေနတာ။ MZ ကိုပဲလုပ္ေတာ့မလား စဥ္းစားေနတာ။ Why MZ ! လို႕ ေမးလာရင္ေတာ့ cassandra က သာမာန္ project ေတြ မလိုအပ္ဘူး။ တျခားမေျပာနဲ႕ mediawiki ကို သံုးထားတဲ့ wikipedia ေတာင္ mysql ကို သံုးထားတာပဲ ၾကည့္ေလ။ mysql ကလြယ္တယ္။ ႏွစ္ၾကာျပီျဖစ္တဲ့အတြက္ community က ရိွျပီးသား။ user million နဲ႕ ခ်ီခဲ့မွသာ နည္းနည္းၾကာတာ။ ဒါေပမယ့္ mysql 5 မွာ partition နဲ႕ fulltext search ေၾကာင့္ million data ကိုေတာင္ ရွာႏုိင္တယ္လုိ႕ ေျပာထားတာပဲ။ Continue Reading »

1

Editor ေရြးခ်ယ္.. တဝဲဝဲလည္

Posted April 4th, 2010 in mac by saturngod

Windows မွာတုန္းကေတာ့ ျပတ္တယ္။ ေရြးခ်ယ္စရာ editor က မ်ားမ်ားစားစားမရိွဘူး။ Notepad++ နဲ႕ဆို ျပီးတယ္။ ကၽြန္ေတာ္က CI ကို အဓိကသံုးတယ္ဆုိေတာ့ CI syntax highlighting ေလးပါမွ သံုးခ်င္တာ။ Notepad++ က CI အတြက္မရဘူး။ အျခား IDE ေတြေတာ့ မသံုးျဖစ္ဘူး။ ေလးလြန္းလုိ႕။ အခုေနာက္ပိုင္း Mac သံုးေတာ့ ေရြးခ်ယ္စရာ IDE ေတြ ရိွလာတယ္။ လက္ရိွ နာမည္ၾကီး IDE ေတြက TextMate, Coda, Espresso , BBEdit တို႕ေတြပဲ။ Continue Reading »

3

PHP mail() function setup in Ubuntu

Posted March 26th, 2010 in Knowledgebase by saturngod

ဒီေန႕ Client Server မွာ တင္ေတာ့ mail() function က php မွာ သံုးမရဘူးျဖစ္ေနတယ္။ တကယ္တန္းေတာ့ symfony မွာ ဘာ plugin လဲမသိပါဘူး။ ေမ့ေတာင္ ေမ့သြားျပီ။ အဲဒါနဲ႕တြဲသံုးထားတာ။ mail() function လိုတယ္ဆိုတာနဲ႕ mail function enable လုပ္ဖို႕ စရပါေတာ့တယ္။ Ubuntu Server ဆိုေတာ့ ရွာရတာ အရမ္းလြယ္တယ္။ ဘာမွ မခက္ဘူး။ exim4 ကို သြင္း။ ျပီးရင္ config လုပ္။ အဲဒါကလည္း

https://help.ubuntu.com/community/Exim4

အဲဒီမွာ ဖတ္လုိက္လို႕ရတယ္။

sudo apt-get install exim4

လုိ႕ သြင္းျပီး

sudo dpkg-reconfigure exim4-config

ဆိုျပီး config လုပ္လုိက္ရံုပဲ။ Config ကလည္း English လိုေရးထားတာပဲေလ။ Wizard နဲ႕step by step လုပ္လုိက္ေတာ့ အဆင္ေျပသြားတယ္။ ျပီးေတာ့ php.ini မွာ

sendmail_path = /usr/sbin/sendmail

ဆိုျပီး သြားထည့္ေပးလုိက္တယ္။ အစက comment ပိတ္ထားတာ။ comment ေလး သြားဖြင့္ ။ sendmail path ေလးထည့္ေပးလုိက္ရံုပဲ။ ေနာက္ဆံုး apache restart ခ်။ ျပန္စမ္းေတာ့ ရသြားပါေလေရာ။ သိပ္လည္း မၾကာလိုက္ပါဘူး။ နာရီဝက္ ေလာက္ပဲ ၾကာတယ္ထင္တယ္။ Ubuntu Server ကို အဲလို လိုခ်င္တာေလး ျမန္ျမန္ ရွာရတာ ေလးကို သေဘာက်တာ။

Page 1 of 41234