Phone : 02-9578755, E-mail : sale@siammodify.com
Knowledge client list all contact us
ออกแบบเว็บไซต์ ออกแบบ Intro ออกแบบเว็บบอร์ด ออกแบบ Flash ลูกค้า Domain ลูกค้า Hosting ปรับโปรแกรม ดูแลรายเดือน เว็บสองภาษา ทั้งหมด

ด้วยผลงานมากกว่า 75 เว็บไซต์ ประสบการณ์มากกว่า 8 ปี จึงทำให้เราและลูกค้ามั่นใจ

เมนูหลักของเว็บไซต์
รับเขียนเว็บไซต์ บริการต่างๆของเรา
ให้คำปรึกษาในการออกแบบเ็ว็บไซต์ บทความน่ารู้กับการเขียนเว็บไซต์
ผลงานการออกแบบเว็บไซต์ ผลงานทั้งหมด
ตัวอย่างลูกค้าออกแบบเว็บไซต์ รายนามลูกค้าทั้งหมด
บริการสำหรับลูกค้า
ออกแบบเว็บไซต์ บริการพื้นที่เว็บไซต์ ( เฉพาะลูกค้าเรา)
รับออกแบบเว็บ แจ้งขอจดโดเมนใหม่ !!
- กรอกรายละเอียดเพื่อเป็นข้อมูลของโดเมน
รับออกแบบเว็บ จัดการโดเมนของท่าน (สำหรับลูกค้าเรา)
- จัดการตั้งค่า Nameserver
- จัดการข้อมูล Domain
รับออกแบบเว็บ ตรวจสอบเจ้าของโดเมนเนม (whois)
รับดูแลเว็บไซต์ ตรวจสอบ/ค้นหาโดเมนว่าง (อยู่ในช่วงจัดทำ)
รับออกแบบเว็บ ตรวจสอบ SEO Reports (อยู่ในช่วงจัดทำ)
คู่มือการใช้งานเว็บ คู่มือการใช้งานโปรแกรม (cPanel)
ติดต่อเขียนเว็บไซต์ ติดต่อสอบถาม
คุณรู้จักสิ่งเหล่านี้แล้วหรือยัง ?
วิธีเขียนป้องกันการโดนดึงรูปไปใช้ (.htaccess)
พอดีมีโอกาสได้เขียน htaccess เลยเอามาโพสแนะนำไว้ให้ครับ สำหร..
รหัส Error บนเว็บไซต์ (101,200,301,304,..)
ปกติแล้วการทำงาน เขียนโปรแกรมรวมไปถึงคนที่ใช้ชีวิตประจำวันบน..
3 สิ่งเล็กๆ ที่ควรรู้สำหรับเจ้าของเว็บไซต์
สวัสดีครับหลังๆนี้ผมก็ไม่ได้เข้ามาเขียนบทความมากสักเท่าใหร่ว..
ใส่ปุ่ม back ในเว็บแบบขำๆ javascript
ก่อนอื่นก็ต้องบอกก่อนนะครับว่า ขำๆในที่นี้คือง่ายๆ ไม่ได้หรู..
PHP 5.3 เปลี่ยนอะไรบ้าง (php version 5.3.x)
สวัสดีครับ มาดูกันว่าใน php version 5.3 มีอะไรเปลี่ยนแปลงบ้า..
รหัส Error บนเว็บไซต์ (403,404,500,504,505)
error ต่างๆบนเว็บไซต์ ตอนนี้ขอเป็นตอนต่อนะครับ ติดค้างไว้นาน..
นักพัฒนา facebook +ติดตั้ง SSL Certificate
พอดีวันนี้มีข่าวมาแจ้งให้ทราบ ที่จริงข่าวนี้หลายๆท่านน่าจะทร..
รับออกแบบเว็บไซต์เชื่อถือได้ไม่หนี.
วันนี้คงมีเนื้อหามาแนะนำกันไม่มากนะครับ แต่จะขอเน้นไปทางลูกค..
เว็บ 3.0 คือ / web 3.0 คือ
สวัสดีครับ วันนี้ siammodify แวะมาเขียนบทความให้อ่านขำๆอีกสั..
วิธีหาว่าได้ defined constants อะไรไว้บ้างและมีค่าเป็นอะไร
เนื่องจาก CMS หรือ Framework หลายๆตัว มีการ defined constant..
share

PHP 5.3 เปลี่ยนอะไรบ้าง (php version 5.3.x)

สวัสดีครับ ช่วงนี้ต้องรวบรวมข้อมูลสำหรับทำงาน เลยถือโอกาสเขียนเป็นบทความเอาไว้ให้หลายๆท่านได้อ่านกัน ที่จริงแล้วส่วนนี้มีคนเขียนไว้ค่อนข้างจะเยอะครับ ลอง search ดูก็น่าจะเจอเยอะอยู่เหมือนกันครับ และคำอธิบายก็จะไกล้ๆเคียงกัน เพราะที่มาก็มาจาก php.net เหมือนกันเกือบทั้งหมดครับ บางที่ก็ไป copy เขามาต่อๆกันไป สำหรับบทความใน siammodify นี้หากผู้ใด copy ไปช่วยติดลิ้งค์กลับด้วยนะครับ

php function บางตัวที่จะถูกตัดออกไปใน php version 5.3

  • call_user_method()
  • call_user_method_array()
  • defin_syslog_variables()
  • dl()
  • ereg()
  • ereg_replace()
  • eregi()
  • eregi_replace()
  • set_magic_quotes_runtime()
  • session_register()
  • session_unregister()
  • session_is_register()
  • set_socket_blocking()
  • split()
  • spliti()
  • sql_regcase()
  • mysql_db_query()
  • mysql_escape_string()

ตัวอย่าง
erigi() become => preg_match(‘/theregex/i’) or => preg_match(‘#theregex#i’)
ereg_replace become => preg_replace(‘/theregex/’) or => preg_replace(‘#theregex#’)

function ที่ถูกตัดออกไปผมว่าน่าจะส่งผลกระทบต่อโปรแกรมหลายๆโปรแกรมครับเนื่องด้วยบาง function ค่อนข้างเป็นที่นิยมตรงส่วนนี้ก็คงต้องไล่ๆปรับกันแหละครับ เช่นพวก ereg ต่างๆและ split รวมไปถึง mysql_db_query ที่เวลาผมแกะโปรแกรมบางตัวก็มักจะเจออยู่บ่อยๆครับ

และสำหรับเรื่องคุณสมบัติจะมีการยกเลิกบางอย่าง ซึ่งคุณสมบัติที่ถูกยกเลิก คือ
- การส่งค่าแบบ reference ( Assigning the return value of new by reference is now deprecated. )
- Call-time pass-by-reference is now deprecated.

สำหรับ function Deprecated features in PHP 5.3.x สามารถอ่านเพิ่มเติมได้ที่นี่นะครับ
http://th.php.net/manual/en/migration53.deprecated.php


นอกจากจะตัด function บางตัวออกไปแล้วสำหรับบาง function ก็มีการเพิ่ม Parameters เข้ามาดังนั้นเราอาจจะจำเป็นต้องไปใส่ Parameters ให้กับ function เหล่านั้นให้ถูกต้องตามด้วยครับ

รายชื่อตัวอย่าง function ที่มีการเพิ่ม Parameters เข้ามา

  • clearstatcache() – Added clear_realpath_cache and filename.
  • copy() - Added a stream context parameter, context.
  • fgetcsv() – Added escape.
  • ini_get_all() – Added details.
  • nl2br() – Added is_xhtml.
  • parse_ini_file() – Added scanner_mode.
  • round() - Added mode.
  • stream_context_create() – Added params.
  • strstr() and stristr() – Added before_needle.

function ที่มีการเพิ่ม Parameters เข้ามาหรือมีการปรับเปลี่ยนสามารถดูเพิ่มเติมได้จากลิ้งค์นี้ครับ
http://th.php.net/manual/en/migration53.parameters.php


Seagull Framework
ผมขอเอ่ยถึงตัว seagull framework สักนิดนะครับ สำหรับ seagull framework ใน version เก่าๆจะมีเรียกใช้ function พวก call_user บางตัวครับ ในส่วนนี้เท่าที่หาดูมีการแจ้งออกมา และทางทีมงาน เขาก็ได้ทำการ fix bug ไปเรียบร้อยแล้ว ปัญหาจะเจอประมาณ
SectionMgr, NavigationDAO::addSection และ NavigationDAO::updateSection

โดยทำการปรับเปลี่นเป็น
return call_user_func_array(array($delegate, $methodName),$parameters);
สำหรับ seagull หากมีข้อผิดพลาดประการใดก็ต้องขออภัยด้วยนะครับ


และในส่วนของ php.ini ก็จะมีการยกเลิกบางอย่างออกไปครับ ตัวใหนผมอธิบายได้จะช่วยอธิบายคร่าวๆไว้ให้นะครับ

  • register_globals แปลว่าการเขียนรับค่าตัวแปรจะต้องเปลี่ยนไปใช้ ( $_REQUEST, $_GET, $_POST, $_SESSION, $_SERVER ) เท่านั้นครับ
  • define_syslog_variables
  • register_long_arrays
  • safe_mode
  • magic_quotes_gpc
  • magic_quotes_runtime
  • magic_quotes_sysbase

สำหรับเรื่อง Changes to INI file handling สามารถอ่านเพิ่มเติมได้ที่นี้นะครับ
http://th.php.net/manual/en/migration53.ini.php


ขอนอกเรื่องอีกนิดนึงนะครับ
พอดีผมได้เจอหลายๆเว็บเขียนบทความเกี่ยวกับ PHP 5.3 หน้าตาเนื้อหาก็คล้ายๆกัน แต่ผมชอบจุดที่อธิบายสั้นๆแต่เข้าใจได้คือ

# ereg, eregi, ereg_replace, eregi_replace เปลี่ยนไปใช้ตระกูล perl compatible regular expressions (preg*)
# split เปลี่ยนไปใช้ preg_split แทน
# mysql_db_query เปลี่ยนไปใช้ mysql_select_db แล้วตามด้วย mysql_query
# mysql_escape_string เปลี่ยนไปใช้ mysql_real_escape_string
# register_globals เปลี่ยนไปใช้ Built-in global variables ($_REQUEST, $_GET, $_POST, $_SESSION, $_SERVER)
# session_register, session_is_register, session_unregister เปลี่ยนไปใช้ $_SESSION

เพียงแค่จุดนี้ก็ช่วยสรุปจุดสำคัญที่เราใช้กันบ่อยๆได้มากทีเดียวครับ


จากทั้งหมดนี้ท่านสามารถอ่านเพิ่มเติมได้ที่ลิ้งค์เหล่านี้นะครับ

What has changed in PHP 5.3.x

http://th.php.net/manual/en/migration53.changes.php

Backward Incompatible Changes in PHP 5.3.x

http://th.php.net/manual/en/migration53.incompatible.php

New features in PHP 5.3.x

http://th.php.net/manual/en/migration53.new-features.php

Changes made to Windows support in PHP 5.3.x

http://th.php.net/manual/en/migration53.windows.php

Changes in SAPI modules in PHP 5.3.x

http://th.php.net/manual/en/migration53.sapi.php

Undeprecated features in PHP 5.3.x

http://th.php.net/manual/en/migration53.undeprecated.php


New Functions in PHP 5.3.x

  • array_replace() – Replaces elements from passed arrays into one array.
  • array_replace_recursive() – Recursively replaces elements from passed arrays into one array.
  • class_alias() – Creates an alias for a user defined class.
  • forward_static_call() – Call a user function from a method context.
  • forward_static_call_array() – Call a user function from a method context, with the arguments contained in an array.
  • gc_collect_cycles() – Forces collection of any existing garbage cycles.
  • gc_disable() – Deactivates the circular reference collector.
  • gc_enable() – Activates the circular reference collector.
  • gc_enabled() – Returns the status of the circular reference collector.
  • get_called_class() – Return the name of the class a static method is called in.
  • gethostname() – Return the current host name for the local machine.
  • header_remove() – Removes an HTTP header previously set using the header() function.
  • lcfirst() – Make a string’s first character lowercase.
  • parse_ini_string() – Parse a configuration string.
  • quoted_printable_encode() – Convert an 8 bit string to a quoted-printable string.

New Functions in PHP 5.3.x
http://th.php.net/manual/en/migration53.functions.php


New stream wrappers in PHP 5.3.x

http://th.php.net/manual/en/migration53.new-stream-wrappers.php

New stream filters in PHP 5.3.x

http://th.php.net/manual/en/migration53.new-stream-filters.php

New Class Constants in PHP 5.3.x

http://th.php.net/manual/en/migration53.class-constants.php

New Methods in PHP 5.3.x

http://th.php.net/manual/en/migration53.methods.php

New Extensions in PHP 5.3.x

http://th.php.net/manual/en/migration53.new-extensions.php

Removed Extensions in PHP 5.3.x

http://th.php.net/manual/en/migration53.removed-extensions.php

Other changes to extensions in PHP 5.3.x

http://th.php.net/manual/en/migration53.extensions-other.php

New Classes in PHP 5.3.x

http://th.php.net/manual/en/migration53.classes.php

New Global Constants in PHP 5.3.x

http://th.php.net/manual/en/migration53.global-constants.php

Other changes in PHP 5.3.x

http://th.php.net/manual/en/migration53.other.php

ผมหวังว่าบทความน่าจะเป็นประโยชน์แก่ใครหลายๆคนนะครับ และ หากท่านใดเอาทบความที่ผมเขียนนี้ไปใช้งาน ช่วยกรุณาใส่ลิ้งค์กลับมายังเว็บผมด้วยนะครับ และหากมีจุดใหนที่ผิดหรือเพี้ยนไปก็ต้องขออภัยด้วยนะครับ และแจ้งมาได้ครับทางผมจะได้แก้ไขให้ถูกต้อง ขอบคุณครับ

แสดงผล 1537 ครั้ง
 
Copyright © 2010 siammodify.com
เว็บไซต์นี้ออกแบบโดยทีมงาน siammodify และ ปรับแต่งภายใต้โปรแกรม wordpress