Pages

Memaparkan catatan dengan label Tutorial. Papar semua catatan
Memaparkan catatan dengan label Tutorial. Papar semua catatan

Rabu, 7 April 2010

Run your PHP manually. How?

Ha, ini ilmu baru yang saya dapat hari ni. Tak kisah lah orang lain dah berkurun lamanya dapat ilmu ni. I don't care about them. hehehe

First
Question: PHP running/process by what?
Answer: CGI

Second
If your supervisor ask you to run some particular php code manually, you can use this method. Run it using the command prompt. Seriously i never know about this before .I only know run the php in linux shell, but i don't know about running it in windows command prompt.

Ok, this is the command to run your php manually in command prompt.

1. open your command prompt


2. go to your php folder in command prompt

3. run this command: php-cgi



4. run your function manually using this command (purple font is your file path and your function to running):

php-cgi C:\xampp\htdocs\linkse\src\util.php -c make_history_net


Done!!


Khamis, 1 April 2010

Call to undefined function curl_init()

Kalau error ni keluar:

Fatal error: Call to undefined function curl_init()

sila pergi ke php.ini tukar kesediaan dia.

Jumaat, 12 Mac 2010

How to send an email with arabic content in PHP script

Today's learning is about how to send an email with arabic content in PHP.

Check your htmlMimeMail setting. maybe you some file name htmlMimeMail.php. then

you just go to that file, do change:

Before:

        $this->build_params['text_encoding'] = '7bit';
        $this->build_params['html_charset']  = 'ISO-8859-1';
        $this->build_params['text_charset']  = 'ISO-8859-1';
        $this->build_params['head_charset']  = 'ISO-8859-1';


After:

        $this->build_params['text_encoding'] = '8bit';
        $this->build_params['html_charset'] = 'utf-8';
        $this->build_params['text_charset'] = 'utf-8';
        $this->build_params['head_charset'] = 'utf-8';


You can also set your header as below :

header('Content-type: text/html; charset=utf-8');

Before:




After:

Selasa, 17 November 2009

Fatal error: Call to undefined function: curl_init()




Today i've found this error. Maybe to some people this error just nothing to them but for me..this error nearly crackin my head..hehe (because i've been stop doing programming about nine month)

So i did asking Uncle Google, then i've found one good solution at this forum :hotscripts.com
So the genius forumers there had suggest to use this method:
  1. you need to stop apache 1st
  2. then you find the php.ini file in apache folder i.e: ..\xampp\apache\bin\php.ini
  3. then you find the word 'curl' inside the php.ini...(you can open this file using notepad or your editor)
  4. you will find this ==> ;extension=php_curl.dll
  5. to enable the curl_init(), you must remove the semi-colon (;) like this ==> extension=php_curl.dll
  6. save your changing
  7. restart back your apache
  8. then run back your website
  9. done..
cool rite??