Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/arnut/domains/arnut.com/public_html/php/index.php on line 10

Warning: include(http://www.arnut.com/header1.php) [function.include]: failed to open stream: no suitable wrapper could be found in /home/arnut/domains/arnut.com/public_html/php/index.php on line 10

Warning: include() [function.include]: Failed opening 'http://www.arnut.com/header1.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/arnut/domains/arnut.com/public_html/php/index.php on line 10
 
| PHP.net | PHP Download | PHP Documentation | PHP Related Links | PHP Snapshots | PHP Presentation System | PHP Documentor | en.wikipedia.org/wiki/PHP | PHP Security |
PHP ย่อมาจาก Personal Home Page > Professional Home Page > PHP Hypertext Preprocessor
PHP เป็นภาษาสริปต์ฝั่ง Server-Side Script เหมือนอย่างภาษา ASP, JSP พัฒนาขึ้นโดย Rasmus Lerdorfs
ในปัจจุบัน php นับเป็นภาษาที่ Web Programmer เลือกใช้งานอันดับต้นๆ ในการนำมาพัฒนาแอพลิเคชั่นบนเว็บ เนื่องจาก php เองเป็นซอฟต์แวร์ Open Source อีกทั้งสามารถรันได้บนทุกระบบปฏิบัติการ ไม่ว่าจะเป็น Unix, Windows, Linux, FreeBSD, Mac OS รวมทั้งภาษา php เองมีความยืนหยุ่นสูงผู้พัฒนาสามารถเรียนรู้ได้อย่างไม่ยากเย็น หากมีพื้นภาษา c, perl ด้วยแล้วยิ่งทำให้ง่ายแก่การศึกษา :)

PEAR - PHP Extension and Application Repository
PEAR is the next revolution in PHP. This repository is bringing higher level programming to PHP. PEAR is a framework and distribution system for reusable PHP components. It eases installation by bringing an automated wizard, and packing the strength and experience of PHP users into a nicely organised OOP library

PECL - The PHP Extension Community Library
PECL is a repository for PHP Extensions, providing a directory of all known extensions and hosting facilities for downloading and development of PHP extensions.

PHP-GTK -
PHP GIMP Toolkit
PHP-GTK is an extension for the PHP programming language that implements language bindings for GTK+. It provides an object-oriented interface to GTK+ classes and functions and greatly simplifies writing client-side cross-platform GUI applications

Smarty - Template Engine
Although Smarty is known as a "Template Engine", it would be more accurately described as a "Template/Presentation Framework." That is, it provides the programmer and template designer with a wealth of tools to automate tasks commonly dealt with at the presentation layer of an application. I stress the word Framework because Smarty is not a simple tag-replacing template engine. Although it can be used for such a simple purpose, its focus is on quick and painless development and deployment of your application, while maintaining high-performance, scalability, security and future growth

Web Services for PHP - Presentation Online

--------------------------------------------------
Database ที่ PHP สนับสนุน

• MySQL (www.mysql.com) ฟรี
• PostgreSQL (www.postgresql.com) ฟรี
• Informix
• Sybase
• Oracle
• Access
• SQL Server
• DBM
• etc

รูปแบบการเขียนภาษา PHP ที่นิยมมีสองรูปแบบคือ
แบบที่ 1 แบบ SGML
<?
   echo "PHP Hello World!";
? >

แบบที่ 2 แบบ XML
<?php
   echo "PHP Hello World!";
?>

สคริปต์ใช้สำหรัลทดสอบว่า PHP รองรับอะไรบ้าง
phpinfo.php
<?php
   phpinfo();
?>


การใส่ Comment ใน PHP
ในภาษา php เราสามารถใส่หมายเหตุโปรแกรม โดยใช้
เครื่องหมาย // หรือ # ใช้ใส่หมายเหตุ 1 บรรทัด
เครื่องหมาย /* xxxxxxxxxxxxxxxxxxx */ ใช้ใส่หมายเหตุหลายบรรทัด

<?php
// comment.php
// program by A.Arnut Ruttanatirakul
# ทดสอบภาษาพีเฮสพี
   phpinfo();
?>



การแทรก HTML ร่วมกับสคริปต์ PHP

<?php
// testhtml..php
// program by A.Arnut Ruttanatirakul

echo "<h2>พีเฮสพีสวัสดี ชาวโลก</h2>";
echo "<br>";
echo "<font color='red'>นายแน่มาก</font>";
// กรณีแท็กที่มี attribute ให้สลับจากเครื่องหมาย " เป็น '

?>



การกำหนดตัวแปรใน PHP
ทำได้โดยใส่เครื่องหมาย $ ด้านหน้าตัวแปรที่ต้องการ

<?php
// variable1.php
// program by A.Arnut Ruttanatirakul

$name = "A.Arnut Ruttanatirakul";
$position ="System Administrator";

$num1 = 20;
$num2 = 30;
$sum=$num1+num2;

echo "ชื่อ: $name <br>";
echo "ตำแหน่ง: $position<br>";
echo "num1 = 20 <br> num2=30<br>";
echo "num1+num2=".$sum."<br>";
// . ใช้ในการเชื่อมต่อข้อความกับตัวแปร
?>


การกำหนดค่าคงที่
<?php
// constant1.php
// program by A.Arnut Ruttanatirakul

define ("name" , "A.Arnut Ruttanatirakul");
define ("email" , "<a href='mailto:arnut@cmsthailand.com'>arnut@cmsthaialnd.com</a>");
define ("url", "<a href='http://www.cmsthailand.com'>http://www.cmsthailand.com</a>");

echo "ชื่อ ", name , "<br>";
echo "อีเมล์ " , email , "<br>";
echo "เว็บไซต์ " , url , "<br>";


?>

 

Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/arnut/domains/arnut.com/public_html/php/index.php on line 213

Warning: include(http://www.arnut.com/footer1.php) [function.include]: failed to open stream: no suitable wrapper could be found in /home/arnut/domains/arnut.com/public_html/php/index.php on line 213

Warning: include() [function.include]: Failed opening 'http://www.arnut.com/footer1.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/arnut/domains/arnut.com/public_html/php/index.php on line 213