Server Side Programming Overview And file system basics

Slides:



Advertisements
Similar presentations
Adding Dynamic Content to your Web Site
Advertisements

Modern Web Application Frameworks CSE 591 – Security and Vulnerability Analysis Spring 2015 Adam Doupé Arizona State University
Introduction to PHP MIS 3501, Fall 2014 Jeremy Shafer
Creating WordPress Websites. Creating a site on your computer Local server Local WordPress installation Setting Up Dreamweaver.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic Server Side Web Technologies: Part 2.
Server & Client  Client: Your computer  Server: Powerful & Expensive computer. Requires network access.
2440: 141 Web Site Administration Web Server-Side Programming Professor: Enoch E. Damson.
1 CS428 Web Engineering Lecture 18 Introduction (PHP - I)
8/17/2015CS346 PHP1 Module 1 Introduction to PHP.
ITM352 PHP and Dynamic Web Pages: Server Side Processing.
Server- Side technologies Client-side vs. Server-side scripts PHP basic ASP.NET basic ColdFusion.
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
AIT 616 Fall 2002 PHP. AIT 616 Fall 2002 PHP  Special scripting language used to dynamically generate web documents  Open source – Free!!!  Performs.
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
IDK0040 Võrgurakendused I harjutus 06: PHP: Introduction Deniss Kumlander.
10/5/2015CS346 PHP1 Module 1 Introduction to PHP.
Java CGI Lecture notes by Theodoros Anagnostopoulos.
Creating Dynamic Web Pages Using PHP and MySQL CS 320.
Intro to PHP IST2101. Review: HTML & Tags 2IST210.
CS 4720 Dynamic Web Applications CS 4720 – Web & Mobile Systems.
David Lawrence 7/8/091Intro. to PHP -- David Lawrence.
IS2803 Developing Multimedia Applications for Business (Part 2) Lecture 2: Introduction to IS2803 Rob Gleasure
8 th Semester, Batch 2009 Department Of Computer Science SSUET.
 Before you continue you should have a basic understanding of the following:  HTML  CSS  JavaScript.
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.
COSC 2328 – Web Programming.  PHP is a server scripting language  It’s widely-used and free  It’s an alternative to Microsoft’s ASP and Ruby  PHP.
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 Tutorial. What is PHP PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages.
PHP stands for …….. “PHP Hypertext Pre-processor” and is a server-side scripting language like ASP. PHP scripts are executed on the server PHP supports.
The Common Gateway Interface (CGI) Pat Morin COMP2405.
PHP Basics and Syntax Lesson 3 ITBS2203 E-Commerce for IT.
PHP using MySQL Database for Web Development (part II)
CGS 3066: Web Programming and Design Spring 2017
Top 8 Best Programming Languages To Learn
CS 330 Class 7 Comments on Exam Programming plan for today:
Introduction to Dynamic Web Programming
ITM352 PHP and Dynamic Web Pages: Server Side Processing 1.
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
Chapter 5 Scripting Language
Introduction to web development concepts
Introduction and Principles
CF101: Welcome to ColdFusion
Server-Side Application and Data Management IT IS 3105 (Spring 2010)
Introduction to Web programming
* Lecture # 7 Instructor: Rida Noor Department of Computer Science
Chapter 5 Scripting Language
PHP / MySQL Introduction
Server-Side Application and Data Management IT IS 3105 (Spring 2010)
PHP Introduction.
Intro to PHP & Variables
Server Side Programming Overview And file system basics
Introduction to Databases with MAMP/LAMP/WAMP thrown in!
Intro to PHP at Winthrop
* Lecture 12 Mapping, Map Reduction Summing integers,
Web Browser server client 3-Tier Architecture Apache web server PHP
Chapter 27 WWW and HTTP.
* Lecture 5 PHP Basics * Course logo spider web photograph from Morguefile openstock photograph by Gabor Karpati, Hungary.
Module 1 Introduction to PHP 11/30/2018 CS346 PHP.
PHP.
JavaScript.
Static and Dynamic Web Pages
IntroductionToPHP Static vs. Dynamic websites
Intro to PHP.
Tutorial 6 PHP & MySQL Li Xu
Introduction to PHP.
PHP an introduction.
Loops and Conditionals Generating , Reading files.
PHP By Prof. B.A.Khivsara Note: The material to prepare this presentation has been taken from internet and are generated only for students reference and.
Web Application Development Using PHP
XAMPP.
Presentation transcript:

Server Side Programming Overview And file system basics Welcome to PHP Server Side Programming Overview And file system basics

About Document Root The document root is established in the apache httpd.conf file. In the CS department it is “public_html” in your home folder. For this course, it is “local_html” in your home folder

File Permissions All HTML and CSS files must be world readable, as must images, etc. PHP files are special on CS server! They may be restricted to owner. Tip 1: View your files with ‘ls –al’ so you get in the habit of reading file permissions – always! Tip 2: You must master the unix command chmod!

Academic Integrity Note You cannot protect HTML/CSS/image files and have them display properly. see the previous slide. You can and must protect your PHP files.

Client-Server Starting Point A Brief Review Client Computer Web Server (Apache) Static Files (index.html)

Add Client/Server Scripting Client Computer Web Server (Apache) File System /cgi-bin Native Code (enter.exe) Server Side cgi, Perl, PHP, … Client Side (JavaScript)

File System (enter.php) A Brief Preview Client Computer Web Server (Apache) + PHP Interpreter File System (enter.php) MySQL Database

Context/History CGI: Common Gateway Interface 1993. Callout to native applications. CGI + Perl Applications written in Perl. Lead to built in Apache Perl Module. Java Another possible as Server Side Language. Not typically built into server as module.

Context/History Continued Coldfusion Dynamic html generation environment Tied to Macromedia - now Adobe Microsoft .NET Framework Key modern component of Windows Includes infrastructure for web development JavaScript Typically run on the client side. Now there is node.js (start 2011) Security/Sandboxing a concern. And very widely used - PHP …

Warning Language Train Wreck is Coming! So far we’ve covered: HTML CSS Now we introduce Server Side Programs Specifically, PHP Keep your head on … Five syntaxes, Client vs. Server view, All interdependent, Wikimedia Commons: Train wreck at Montparnasse

PHP resources The source - the PHP Group (www.php.net). The PHP Group Tutorial and Manual. Our zyBooks Text W3 Schools W3 School PHP Tutorial.

Learn PHP in 5 easy steps! (PHP Instructors Hate Him!) public class Easy{ public static void main(String[] args){ Easy e = new Easy(); String toPrint = "Hello" + " " + "People!"; e.printSomething(toPrint); } public boolean printSomething(String something){ System.out.println(something); return true;

Learn PHP in 5 easy steps! 1. PHP is dynamically typed public class Easy{ public static void main(String[] args){ Easy e = new Easy(); String toPrint = "Hello" + " " + "People!"; e.printSomething(toPrint); } public boolean printSomething(String something){ System.out.println(something); return true;

Learn PHP in 5 easy steps! 2. Variables start with $ public class Easy{ public static main($args){ $e = new Easy(); $toPrint = "Hello" + " " + "People!"; e.printSomething($toPrint); } public printSomething($something){ System.out.println($something); return true;

Learn PHP in 5 easy steps! 3. Call a function a function public class Easy{ public static function main($args){ $e = new Easy(); $toPrint = "Hello" + " " + "People!"; e.printSomething($toPrint); } public function printSomething($something){ System.out.println($something); return true;

Learn PHP in 5 easy steps! 4. Speaking of calling functions… public class Easy{ public function printSomething($something){ echo($something); return true; } //No main in PHP! $e = new Easy(); $toPrint = "Hello" + " " + "People!"; $e->printSomething($toPrint);

Learn PHP in 5 easy steps! 5. Know the language basics public class Easy{ public function printSomething($something){ echo($something); return true; } //No main in PHP! $e = new Easy(); $toPrint = "Hello" . " " . "People!"; $e->printSomething($toPrint);

Learn PHP in 5 easy steps! Done! public class Easy{ public function printSomething($something){ echo($something); return true; } //No main in PHP! $e = new Easy(); $toPrint = "Hello" . " " . "People!"; $e->printSomething($toPrint);

Basics Server runs all *.php files through PHP interpreter before sending to client Special language constructs pretend to be functions These include print, echo, include, require, return, exit, array <?php print “Hello World!”; ?> Vs. <? CSU CT 310 Web Development ©Ross Beveridge & Jaime Ruiz 4/3/2019

Echo, Print, Comments echo and print both output strings echo allows for multiple parameters to be passed print acts more like a function and only allows one // and # comment out single lines /* blah blah */ comment out blocks of text CSU CT 310 Web Development ©Ross Beveridge & Jaime Ruiz 4/3/2019

Example – 00 CSU CT 310 Web Development ©Ross Beveridge & Jaime Ruiz 4/3/2019

What the Client Sees! PHP code NEVER leaves the server. Paying attention to how another person will see the source is like? Keeping your house clean. Cleaning behind the refrigerator. CSU CT 310 Web Development ©Ross Beveridge & Jaime Ruiz 4/3/2019

More about Your Machine Looking ahead to PHP and MySQL Look up LAMP, MAMP, WAMP