PHP5 STUDY #1 100223 SPARCS 구성모. 공부하기전에  Xming  Xlaunch  Windows 용 Xserver 프리웨어.

Slides:



Advertisements
Similar presentations
Session 1 & 2BBK P1 Module5-May-2007 : [‹#›] PHP: The Basics.
Advertisements

Introduction to PHP Dr. Charles Severance
IST 221 Internet Concepts and Applications Introduction to PHP.
Introduction to PHP (Part-1) Basharat Mahmood, Department of Computer Science,CIIT,Islamabad, Pakistan. 1.
PHP Server-side Programming. PHP  PHP stands for PHP: Hypertext Preprocessor  PHP is interpreted  PHP code is embedded into HTML code  interpreter.
Server side basics.
Server side basics CS URLs and web servers  Usually when you type a URL in your browser:  Your computer looks up the server's IP address using.
PHP Basics 1 ICS213, 1 / 2011 Dr. Seung Hwan Kang 1.
Php. What is PHP? PHP is an acronym for "PHP Hypertext Preprocessor" PHP is a widely-used, open source scripting language PHP scripts are executed on.
PHP Workshop ‹#› PHP: The Basics. PHP Workshop ‹#› What is it? PHP is a scripting language commonly used on web servers. –Stands for “PHP: Hypertext Preprocessor”
PHP1-1 PHP Xingquan (Hill) Zhu
August Chapter 1 - Essential PHP spring into PHP 5 by Steven Holzner Slides were developed by Jack Davis College of Information Science and Technology.
PHP Overview CS PHP PHP = PHP: Hypertext Preprocessor Server-side scripting language that may be embedded into HTML One goal is to get PHP files.
PHP MOHAMMED SHURRAB TO MISS/ RASHA ATTALLAH. What is PHP? Stands for "PHP Hypertext Preprocessor" Server-side scripting language HTML-embedded Supports.
Copyright © Curt Hill PhP History and Introduction.
PHP H ypertext P re-processor. Unit 6 - PHP - Hello World! - Data types - Control structures - Operators.
Lecture 12 PHP Basics Boriana Koleva Room: C54
An Introduction to PHP The University of Tennessee at Chattanooga C. Daniel Chase “An introduction to basic PHP use with a focus on the power of dynamic.
PHP Flow Control Loops, Functions, Return, Exit, Require, Try...Catch Software University SoftUni Team Technical Trainers.
NMED 3850 A Advanced Online Design January 26, 2010 V. Mahadevan.
Nael Alian Introduction to PHP
Chap 3 – PHP Quick Start COMP RL Professor Mattos.
IST 210: PHP BASICS IST 210: Organization of Data IST210 1.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
Introduction to PHP “PHP is a server-side scripting language designed specifically for the Web. Within an HTML page, you can embed PHP code that will be.
PHP By Sergio Rodriguez By Sergio Rodriguez. PHP G PHP: Hypertext Preprocessor G Scripting language G PHP: Hypertext Preprocessor G Scripting language.
Introduction to PHP A user navigates in her browser to a page that ends with a.php extension The request is sent to a web server, which directs the request.
PHP - Basic Language Constructs CSCI 297 Scripting Languages - Day Two.
CONTROL STRUCTURE The if, elseif, and else & switch Statements 1.
Introduction to PHP – Part 2 Sudeshna Dey. Arrays A series of homogeneous elements Elements have values in form of stored data Has a key associated with.
Class 2Intro to Databases Goals of this class Include & Require in PHP Generating Random Numbers in PHP Arrays – Numerically Indexed and Associative Program.
PHP Teresa Worner. What is it? PHP: Hypertext Preprocessor server-side scripting language open source cross-platform compatible with almost all servers.php.php3.phtml.
CS320 Web and Internet Programming Introduction to PHP Chengyu Sun California State University, Los Angeles.
PHP PHP: Hypertext Preprocesor Personal Home Page Tools.
1Computer Sciences Department Princess Nourah bint Abdulrahman University.
Intro to PHP IST2101. Review: HTML & Tags 2IST210.
ITM © Port, KazmanVariables - 1 ITM 352 Data types, Variables.
Comments in PHP In PHP, we use // to make a singleline comment or /* and */ to make a large comment block. Comment is a part of your PHP code that will.
PHP - 1h. How it works Client requests document Server loads document in memory Server processes document with relevant module (PHP) Server sends XHTML.
CSE 154 LECTURE 5: INTRO TO PHP. URLs and web servers usually when you type a URL in your browser: your computer looks up the.
CHAPTER 6 Introduction to PHP5 Part I อ. ยืนยง กันทะเนตร คณะเทคโนโลยีสารสนเทศและการสื่อสาร มหาวิทยาลัยพะเยา 1.
PHP Workshop ‹#› أطلق إبداعك 2 أطلق إبداعك 2 مدرس معتمد من مركز زووم PHP: The Basics.
Chapter 1 Introduction to PHP Part 1. Textbook’s Code DOWNLOADS PHP and MySQL for Dynamic Web Sites Complete Set of Scripts.
 Variables can store data of different types, and different data types can do different things.  PHP supports the following data types:  String  Integer.
Intro to PHP More About PHP. So far we've covered... Web Servers & Protocols Presentation Layer (static pages) For the rest of the semester... Application.
1 PHP Intro PHP Introduction After this lecture, you should be able to: Know the fundamental concepts of Web Scripting Languages in general, PHP in particular.
ITM © Port, KazmanVariables - 1 ITM 352 Data types, Variables Class #4.
Dr. Abdullah Almutairi Spring PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. PHP is a widely-used,
PHP Overview. What is PHP Widely available scripting language Free Alternative to Microsoft’s ASP Runs on the Web Server; not in the browser Example:
Unit – 3 Control structures. Condition Statements 1.If.…..else :- Has someone ever told you, "if you work hard, then you will succeed"? And what happens.
CGS 3066: Web Programming and Design Spring 2016 PHP.
Scott Marino MSMIS Summer Session Web Site Design and Authoring Session 13 Scott Marino.
CSE 154 LECTURE 15: EMBEDDED PHP. PHP syntax template HTML content HTML content HTML content... PHP any contents of.
By bscshelp.com 1.  It is a group assignment.  Complete Website design Using Html and Css.  Due date: 10 th December, 2014 (Hard Deadline) 2.
Radoslav Georgiev Telerik Corporation
1 Server Side scripting PHP. 2 What is PHP? PHP stands for PHP: Hypertext Preprocessor PHP is a server-side scripting language, like ASP PHP scripts are.
PHP An introduction. September 2012Web Programming2 On the web ● ● “PHP is a widely-used general-purpose scripting.
1 1 إعداد : عبدالرحمن محجوب حمد م 2017 تقنيات الانترنت 2 mtc.edu.sd.
PHP using MySQL Database for Web Development (part II)
CGS 3066: Web Programming and Design Spring 2017
Introduction to PHP Part 1
PHP (PHP: Hypertext Preprocessor)
Conditional Statements, Loops, Exit, Require
Server-Side Application and Data Management IT IS 3105 (Spring 2010)
Nate Brunelle Today: Conditional Decision Statements
PHP an introduction.
Nate Brunelle Today: Strings, Type Casting
PHP Language Basics.
SEEM 4540 Tutorial 4 Basic PHP based on w3Schools
Presentation transcript:

PHP5 STUDY # SPARCS 구성모

공부하기전에  Xming  Xlaunch  Windows 용 Xserver 프리웨어

PHP  스크립트 언어  PHP1 : Personal Home Page Tools 1.0  PHP2 : HTML 파싱  PHP3 : PHP : Hypertext Preprocessor  PHP4  PHP5 : 객체지향

PHP 와 비슷한 언어  C, Perl, ASP  JSP  프레임워크 : Django, Rails

간단한 PHP 예제 <html><head></head><body><?phpecho?></body></html> “ 현재시각 ”. date(‘h:i:s’); “Hello, world!”;

PHP 실행 구조 클라이언트 웹서버 PHP 엔진 확장 모듈 DB 외부 라이브러리 외부 라이브러리

출력 <? echo (“hi 1”); echo “hi 2”; print (“hi 3”); print “hi 4”; echo(print “hi 5”); ?>

주석  한줄주석  //  #  여러줄 주석  /* ~ */

변수형 (Type)  Integer  Float  String  Boolean  NULL  Array  Object

String  HERE docs : escape character 를 무시함 <?php $str = <<<EOD Example of string /n Spanning multiple lines /t $srt Using heredox syntax. EOD;?>

Boolean  TRUE, FALSE  False 가 되는 값들  Integer 0  Float 0.0  String “”, “0”  아무런 요소도 가지지 않은 배열  아무 멤버 변수도 가지지 않은 객체  NULL

Type Juggling <? print “4” + 2; print “4”. 2; $a = 3; print (real)$a; print “5 < $a”; ?>

변수  copy by value  참조 (&)  상수 >define(‘RED’, “BLUE”); >print RED;

변수 <?php $a = “hello”; $$a = “world”; print $$a; print “$a $hello”; print “$$a” print “{$$a}” ?>

연산자 .=, AND, OR, XOR, ===, ? :

변수 관련 함수  is_int()  is_null()  is_finite()  settype()  unset()

if 문 if(){}elseif(){}else{}if():elseif():else():endif;

switch 문 switch(){ case value1 : default : }

반복문  while  do-while  break  continue  for( 초기화, 조건, 증가식 )  foreach  endfor

exit <?php $filename = “./hello.php”; $file = fopen($filename, ‘r’) or exit(“unable to open file $filename”); echo “ after file open”; ?>  die, return

배열 <?php $cs[“CS300”] = “Algorithm”; $cs[“CS320”} = “PL”; print $cs[“CS320”]; ?>

배열 <? $cs[] = “Algorithm”; $cs[] = “PL”; print $cs[1]; print $cs; print_r($cs);

foreach foreach($cs as $value){ print $value; } foreach($cs as $key => $value){ print $key.”:”.$value; }

배열  초기화 $cs = array(3=>”Algorithm”, “PL”);  다중 배열  +( 통합연산자 )

배열 관련 함수  array_flip()  array_keys()  array_merge()  array_push()  array_rand()  array_reverse()  array_slice();  array_sum();  array_each();

함수  function name(){}  call by value

가변함수 <? function printbold($str){ print(“ $str ”); } $myf = “printbold”; print $myf(“SPARCS”); ?>

고급  클래스, 파일  데이터베이스  네트워크  디자인

마치며