Esoft Metro Campus - Diploma in Web Engineering - (Module VIII) Multimedia Technologies
(Template - Virtusa Corporate)
Contents:
include and require Statements
include and require
include_once Statement
Validating Files
file_exists() function
is_dir() function
is_readable() function
is_writable() function
is_executable() function
filesize() function
filemtime() function
filectime() function
fileatime() function
Creating and deleting files
touch() function
unlink() function
File reading, writing and appending
Open File - fopen()
Close File - fclose()
Read File - fread()
Read Single Line - fgets()
Check End-Of-File - feof()
Read Single Character - fgetc()
Seek File - fseek()
Write File - fwrite()
Write File - fputs()
Lock File - flock()
Working with Directories
Create directory - mkdir()
Remove directory - rmdir()
Open directory - opendir()
Read directory - readdir()
Contents:-
Introduction
What is a File?
High Level I/O Functions
Defining & Opening a File
Closing a File
The getc and putc Functions
The getw and putw Functions
The fprintf and fscanf Functions
Esoft Metro Campus - Diploma in Web Engineering - (Module VI) Fundamentals of PHP
(Template - Virtusa Corporate)
Contents:
Introduction to PHP
What PHP Can Do?
PHP Environment Setup
What a PHP File is?
PHP Syntax
Comments in PHP
echo and print Statements
PHP Variables
PHP Data Types
Changing Type by settype()
Changing Type by Casting
PHP Constants
Arithmetic Operators
String Operators
Assignment Operators
Comparison Operators
Logical Operators
Operators Precedence
If Statement
If… Else Statement
If… Else if… Else Statement
Switch Statement
The ? Operator
While Loop
Do While Loop
For Loop
break Statement
continue Statement
Functions
User Defined Functions
Functions - Returning values
Default Argument Value
Arguments as Reference
Existence of Functions
Variable Local and Global Scope
The global Keyword
GLOBALS Array
Superglobals
Static Variables
Esoft Metro Campus - Diploma in Web Engineering - (Module IX) Using Extensions and Image Manipulation
(Template - Virtusa Corporate)
Contents:
Image Manipulation with PHP
GD Library
ImageCreate()
ImageColorAllocate()
Drawing shapes and lines
imageellipse()
imagearc()
imagepolygon()
imagerectangle()
imageline()
Creating a new image
Using a Color Fill
imagefilledellipse()
imagefilledarc()
imagefilledpolygon()
imagefilledrectangle()
Basic Pie Chart
3D Pie Chart
Modifying Existing Images
imagecreatefrompng()
imagecolortransparent()
imagecopymerge()
Creating a new image…
Stacking images…
Imagestring()
Draw a string
Contents:-
Introduction
What is a File?
High Level I/O Functions
Defining & Opening a File
Closing a File
The getc and putc Functions
The getw and putw Functions
The fprintf and fscanf Functions
Esoft Metro Campus - Diploma in Web Engineering - (Module VI) Fundamentals of PHP
(Template - Virtusa Corporate)
Contents:
Introduction to PHP
What PHP Can Do?
PHP Environment Setup
What a PHP File is?
PHP Syntax
Comments in PHP
echo and print Statements
PHP Variables
PHP Data Types
Changing Type by settype()
Changing Type by Casting
PHP Constants
Arithmetic Operators
String Operators
Assignment Operators
Comparison Operators
Logical Operators
Operators Precedence
If Statement
If… Else Statement
If… Else if… Else Statement
Switch Statement
The ? Operator
While Loop
Do While Loop
For Loop
break Statement
continue Statement
Functions
User Defined Functions
Functions - Returning values
Default Argument Value
Arguments as Reference
Existence of Functions
Variable Local and Global Scope
The global Keyword
GLOBALS Array
Superglobals
Static Variables
Esoft Metro Campus - Diploma in Web Engineering - (Module IX) Using Extensions and Image Manipulation
(Template - Virtusa Corporate)
Contents:
Image Manipulation with PHP
GD Library
ImageCreate()
ImageColorAllocate()
Drawing shapes and lines
imageellipse()
imagearc()
imagepolygon()
imagerectangle()
imageline()
Creating a new image
Using a Color Fill
imagefilledellipse()
imagefilledarc()
imagefilledpolygon()
imagefilledrectangle()
Basic Pie Chart
3D Pie Chart
Modifying Existing Images
imagecreatefrompng()
imagecolortransparent()
imagecopymerge()
Creating a new image…
Stacking images…
Imagestring()
Draw a string
Esoft Metro Campus - Diploma in Web Engineering - (Module VII) Advanced PHP Concepts
(Template - Virtusa Corporate)
Contents:
Arrays
Indexed Arrays
Associative Arrays
Multidimensional arrays
Array Functions
PHP Objects and Classes
Creating an Object
Properties of Objects
Object Methods
Constructors
Inheritance
Method overriding
PHP Strings
printf() Function
String Functions
PHP Date/Time Functions
time() Function
getdate() Function
date() Function
mktime() function
checkdate() function
PHP Form Handling
Collecting form data with PHP
GET vs POST
Data validation against malicious code
Required fields validation
Validating an E-mail address
PHP mail() Function
Using header() function to redirect user
File Upload
Processing the uploaded file
Check if File Already Exists
Limit File Size
Limit File Type
Check if image file is an actual image
Uploading File
Cookies
Sessions
Esoft Metro Campus - Diploma in Web Engineering - (Module III) Coding HTML for Basic Web Designing
(Template - Virtusa Corporate)
Contents:
Introduction to HTML
HTML Versions
HTML Standards
Creating a Simple HTML Document
Document Type Declaration
Comments in HTML
HTML Attributes
Paragraphs
Line Break
Headings
Text Formatting
Font Formatting
Images
Hyperlinks
Page Body
Lists
Tables
Cell Merging in a Table
Table Attributes
Horizontal Rule
Iframes
HTML Blocks
Division
Span
Audio
Video
Youtube Videos
Forms and Input
Introduction to CSS
Advantages of Using CSS
CSS Syntax
CSS Comments
How to Insert CSS?
CSS Tag, ID and Class Selectors
Grouping and Nesting Selectors
CSS Backgrounds
CSS Text
CSS Fonts
CSS Links
CSS Lists
CSS Tables
CSS Box Model
CSS Dimension
CSS Display - Block and Inline
CSS Positioning
CSS Float
CSS Alignment
Navigation Menu in CSS
Esoft Metro Campus - Diploma in Web Engineering - (Module II) Multimedia Technologies
(Template - Virtusa Corporate)
Contents:
What is a Database?
The Relational Data Model
Relationships
Normalization
Functional Dependency
Normal Forms
DBMS
What is MySQL?
PHP Connect to MySQL
Create a MySQL Database
Connect to Database
Close Database
Create a MySQL Table
Insert Data Into MySQL
Get Last ID
Insert Multiple Records
Prepared Statements
Select Data From MySQL
Update Data in MySQL
Delete Data From MySQL
Esoft Metro Campus - Diploma in Web Engineering - (Module V) Programming with JavaScript
(Template - Virtusa Corporate)
Contents:
Introduction to JavaScript
What JavaScript Can Do?
Script tag in HTML
Noscript tag in HTML
Your First JavaScript Program
JavaScript Placement in HTML File
JavaScript Syntax
JavaScript Data Types
JavaScript Variables
JavaScript Identifiers
Arithmetic Operators
String Concatenation Operators
Assignment Operators
Comparison Operators
Logical Operators
Bitwise Operators
If Statement
If… Else Statement
If… Else if… Else Statement
Switch Statement
The ? Operator
While Loop
Do While Loop
For Loop
For…in Loop
break Statement
continue Statement
Arrays
Functions
JavaScript Objects
JavaScript Scope
Strings
Regular Expressions
JavaScript Numbers
Math Object
Date and Time
JavaScript Events
Dialog Boxes
Error Handling in JavaScript
JavaScript Forms Validation
JavaScript HTML DOM
JavaScript BOM
Based on chapter 2 of the textbook "Building Java Programs", 3rd edition. Covers primitive data types, variables, operators, ASCII values for chars, operator precedence, String concatenation, casting, for loops, nested for loops, and class constants.
See a video presentation of this slideshow on my YouTube channel JavaGoddess, at https://www.youtube.com/watch?v=N7SBkMY65gc&t=4s
Core Java Online training is Offering at Glory IT Technologies Pvt. Ltd. which is an object oriented programming language is classified into three basic level of programming viz. core java programming, specialized java programming & advanced Java programming. Among these first basic level is called basic or core Java programming language & is the first step of mastering Java language.
Final year M.E IEEE PROJECTS TITLES 2014-2015 Final year IEEE PROJECTS TITLES 2014-2015 Final year M.TECH IEEE PROJECTS TITLES 2014-2015 Final year B.E IEEE
C Programming Language is the most popular computer language and most used programming language till now. It is very simple and elegant language. This lecture series will give you basic concepts of structured programming language with C.
Text Input / Output: Files, Streams, Standard Library Input / Output Functions, Formatting Input / Output Functions, Character Input / Output Functions, Binary Input / Output: Text versus Binary Streams, Standard Library, Functions for Files, Converting File Type
Wherever there is a need to handle large volumes of data, it is advantageous to store data on the disks and read whenever necessary. This method employs the concept of files to store data. A file is a place on disk where a group of related data is stored.file handling c programming tutorial
This presentation delivered for undergraduate students under the university relations programme of 99X Technology. This presentation covers basic concepts of Unified Modelling Language including some hands-on activities.
Advanced Web Development in PHP - Understanding REST APIRasan Samarasinghe
ESOFT Metro Campus - Advanced Web Development in PHP - (Module VIII) Understanding REST API
(Template - Virtusa Corporate)
Resources: codeofaninja.com
Contents:
What is an API?
Comparing a website to an API
Classification of APIs
What is REST API?
What model does REST use?
REST HTTP Methods
HTTP Codes
The advantages of REST
What is CRUD?
CRUD Operations
CRUD Application Example
Simple REST API Implementation in PHP
Web root Folders and Files Structure
MySQL Database
Reading all Products
Reading one Product
Creating a Product
Updating a Product
Deleting a Product
Searching a Product
Advanced Web Development in PHP - Understanding Project Development Methodolo...Rasan Samarasinghe
ESOFT Metro Campus - Advanced Web Development in PHP - (Module II) Understanding Project Development Methodologies (Scrum and Kanban)
(Template - Virtusa Corporate)
Image courtesy: Axosoft
Contents:
Agile Software Development
Agile Manifesto
Customer’s Bill of Rights
Project Team’s Bill of Rights
What is Scrum?
Scrum Timeline
Team Roles in Scrum
Product Backlog
User Story
Release Backlog
Time Estimation
Time Estimation Techniques
Sprint Backlog
Burndown Charts
Daily Standups
Sprint Retrospectives
Kanban
Kanban Board
Kanban WIP Limits
Scrum + Kanban
Advanced Web Development in PHP - Code Versioning and Branching with GitRasan Samarasinghe
ESOFT Metro Campus - Advanced Web Development in PHP - (Module III) Code Versioning and Branching with Git
(Template - Virtusa Corporate)
Contents:
Introduction to Git
What is Version Controlling?
What is Distributed Version Controlling?
Why Use a Version Control System?
Downloading and Installing Git
Git Life Cycle
Init command
Clone Command
Config Command
Add Command
Commit Command
Status Command
Log Command
Diff Command
Revert Command
Reset Command
Clean Command
Commit --amend Command
Rebase Command
Reflog Command
Branch Command
Checkout Command
Merge Command
Remote Command
Fetch Command
Pull Command
Push Command
Esoft Metro Campus - Diploma in Web Engineering - (Module II) Multimedia Technologies
(Template - Virtusa Corporate)
Contents:
What are Graphics ?
Digital Image Concepts
Pixel
Resolution of Images
Resolution of Devices
Color Depth
Color Palette
Dithering
Bitmap and Vector Graphics
Bitmap Graphics
Vector Graphics
Comparison
Graphics File Formats
Bit Map
Tagged Image File Format
Graphical Interchange Format
Join Picture Expert Group
Portable Network Graphics
Multi-image Network Graphics
Multimedia on Web
Animations
Rollovers
Animated GIF
Flash Files
Audio
Audio on Web Sites
Audio File Formats
MIDI
WAVE
MP3
AU
AIFF
Video
Video File Formats
AVI
ASF
MPEG
QuickTime
RealVideo
Copyrights of Web Content
Esoft Metro Campus - Programming with C++
(Template - Virtusa Corporate)
Contents:
Overview of C++ Language
C++ Program Structure
C++ Basic Syntax
Primitive Built-in types in C++
Variable types
typedef Declarations
Enumerated Types
Variable Scope
Constants/Literals
Storage Classes
Operators
Control Constructs
Functions
Math Operations in C++
Arrays
Multi-dimensional Arrays
Strings
C++ Pointers
References
Date and Time
Structures
Basic Input / Output
Classes and Objects
Inheritance
Overloading
Polymorphism
Interfaces
Files and Streams
Exception Handling
Dynamic Memory
Namespaces
Templates
Preprocessor
Multithreading
Esoft Metro Campus - Certificate in c / c++ programmingRasan Samarasinghe
Esoft Metro Campus - Certificate in java basics
(Template - Virtusa Corporate)
Contents:
Structure of a program
Variables & Data types
Constants
Operators
Basic Input/output
Control Structures
Functions
Arrays
Character Sequences
Pointers and Dynamic Memory
Unions
Other Data Types
Input/output with files
Searching
Sorting
Introduction to data structures
ESOFT Metro Campus - Diploma in Software Engineering - (Module VII) Introduction to Project Management
(Template - Virtusa Corporate)
Contents:
What is a Project?
History of the Project Management
Attributes of a Project
What is Project Management?
Why Project Management Important?
The Triple Constraints of a Project
Project Stakeholders
Performing Organizational Structures
Project Management Life Cycle
Project Management Processes
Nine Knowledge Areas
Integration Management
Scope Management
Time Management
Cost Management
Quality Management
Human Resource Management
Communication Management
Risk Management
Procurement Management
ESOFT Metro Campus - Diploma in Software Engineering - (Module VI) Windows Based Application Development in Java
(Template - Virtusa Corporate)
Contents:
Introduction to Java
Features of Java
What you can create by Java?
Start Java Programming
Creating First Java Program
Java Virtual Machine
Basic Rules to Remember
Keywords in Java
Comments in Java Programs
Printing Statements
Primitive Data Types in Java
Arithmetic Operators
Assignment Operators
Comparison Operators
Logical Operators
If Statement
If… Else Statement
If… Else if… Else Statement
Nested If Statement
While Loop
Do While Loop
For Loop
Reading User Input
Arrays
Two Dimensional Arrays
Strings
Objects and Classes
Java Classes
Java Objects
Methods with Return Value
Methods without Return Value
Constructors
Method Overloading
Variable Types
Inheritance
Method Overriding
Abstract Classes
Interfaces
Polymorphism
Packages
Access Modifiers
Encapsulation
Exceptions
JDBC
GUI Applications with Swing
NetBeans IDE
ESOFT Metro Campus - Diploma in Software Engineering - (Module V) Windows Based Application Development in C#
(Template - Virtusa Corporate)
Contents:
Introduction to .NET Framework
.NET Framework Platform Architecture
Microsoft Visual Studio
C# Language
C#, VS and .NET Framework Versions
Your First C# Application
Printing Statements
Comments in C#
Common Type System
Value Types and Reference Type
Variables Declaration in C#
Type Conversion
Arithmetic Operators
Assignment Operators
Comparison Operators
Logical Operators
If Statement
If… Else Statement
If… Else if… Else Statement
Nested If Statement
Switch Statement
While Loop
Do While Loop
For Loop
Arrays
Accessing Arrays using foreach Loop
Two Dimensional Arrays
Classes and Objects in C#
Inheritance in C#
Partial Classes
Namespaces
Windows Forms Applications
Using Buttons, Labels and Text Boxes
Displaying Message Boxes
Error Handling with Try… Catch… finally…
Using Radio Buttons
Using Check Boxes
Using List Boxes
Creating Menus
Creating ToolStrips
MDI Forms
Database Application in C#
Creating a Simple Database Application
SQL Insert / Update / Retrieving / Delete
SQL Command Execute Methods
Data Sets
ESOFT Metro Campus - Diploma in Software Engineering - (Module IV) Database Concepts
(Template - Virtusa Corporate)
Contents:
Introduction to Databases
Data
Information
Database
Database System
Database Applications
Evolution of Databases
Traditional Files Based Systems
Limitations in Traditional Files
The Database Approach
Advantages of Database Approach
Disadvantages of Database Approach
Database Management Systems
DBMS Functions
Database Architecture
ANSI-SPARC 3 Level Architecture
The Relational Data Model
What is a Relation?
Primary Key
Cardinality and Degree
Relationships
Foreign Key
Data Integrity
Data Dictionary
Database Design
Requirements Collection and analysis
Conceptual Design
Logical Design
Physical Design
Entity Relationship Model
A mini-world example
Entities
Relationships
ERD Notations
Cardinality
Optional Participation
Entities and Relationships
Attributes
Entity Relationship Diagram
Entities
ERD Showing Weak Entities
Super Type / Sub Type Relationships
Mapping ERD to Relational
Map Regular Entities
Map Weak Entities
Map Binary Relationships
Map Associated Entities
Map Unary Relationships
Map Ternary Relationships
Map Supertype/Subtype Relationships
Normalization
Advantages of Normalization
Disadvantages of Normalization
Normal Forms
Functional Dependency
Purchase Order Relation in 0NF
Purchase Order Relation in 1NF
Purchase Order Relations in 2NF
Purchase Order Relations in 3NF
Normalized Relations
BCNF – Boyce Codd Normal Form
Structured Query Language
What We Can Do with SQL ?
SQL Commands
SQL CREATE DATABASE
SQL CREATE TABLE
SQL DROP
SQL Constraints
SQL NOT NULL
SQL PRIMARY KEY
SQL CHECK
SQL FOREIGN KEY
SQL ALTER TABLE
SQL INSERT INTO
SQL INSERT INTO SELECT
SQL SELECT
SQL SELECT DISTINCT
SQL WHERE
SQL AND & OR
SQL ORDER BY
SQL UPDATE
SQL DELETE
SQL LIKE
SQL IN
SQL BETWEEN
SQL INNER JOIN
SQL LEFT JOIN
SQL RIGHT JOIN
SQL UNION
SQL AS
SQL Aggregate Functions
SQL Scalar functions
SQL GROUP BY
SQL HAVING
Database Administration
SQL Database Administration
Esoft Metro Campus - Diploma in Software Engineering - (Module I) Introduction to Software Engineering
(Template - Virtusa Corporate)
Contents:
What is software?
Software classification
Generic Software vs Custom Software
Attributes of Software
What is Software Engineering?
Software Engineering Process Model
Waterfall Model
Waterfall Model Stages
Extended Waterfall Model
Prototype Model
Throw away prototype model
Evolutionary prototype model
Rapid application development model (RAD)
Stages in the RAD
Student information management system project report ii.pdfKamal Acharya
Our project explains about the student management. This project mainly explains the various actions related to student details. This project shows some ease in adding, editing and deleting the student details. It also provides a less time consuming process for viewing, adding, editing and deleting the marks of the students.
Cosmetic shop management system project report.pdfKamal Acharya
Buying new cosmetic products is difficult. It can even be scary for those who have sensitive skin and are prone to skin trouble. The information needed to alleviate this problem is on the back of each product, but it's thought to interpret those ingredient lists unless you have a background in chemistry.
Instead of buying and hoping for the best, we can use data science to help us predict which products may be good fits for us. It includes various function programs to do the above mentioned tasks.
Data file handling has been effectively used in the program.
The automated cosmetic shop management system should deal with the automation of general workflow and administration process of the shop. The main processes of the system focus on customer's request where the system is able to search the most appropriate products and deliver it to the customers. It should help the employees to quickly identify the list of cosmetic product that have reached the minimum quantity and also keep a track of expired date for each cosmetic product. It should help the employees to find the rack number in which the product is placed.It is also Faster and more efficient way.
Explore the innovative world of trenchless pipe repair with our comprehensive guide, "The Benefits and Techniques of Trenchless Pipe Repair." This document delves into the modern methods of repairing underground pipes without the need for extensive excavation, highlighting the numerous advantages and the latest techniques used in the industry.
Learn about the cost savings, reduced environmental impact, and minimal disruption associated with trenchless technology. Discover detailed explanations of popular techniques such as pipe bursting, cured-in-place pipe (CIPP) lining, and directional drilling. Understand how these methods can be applied to various types of infrastructure, from residential plumbing to large-scale municipal systems.
Ideal for homeowners, contractors, engineers, and anyone interested in modern plumbing solutions, this guide provides valuable insights into why trenchless pipe repair is becoming the preferred choice for pipe rehabilitation. Stay informed about the latest advancements and best practices in the field.
About
Indigenized remote control interface card suitable for MAFI system CCR equipment. Compatible for IDM8000 CCR. Backplane mounted serial and TCP/Ethernet communication module for CCR remote access. IDM 8000 CCR remote control on serial and TCP protocol.
• Remote control: Parallel or serial interface.
• Compatible with MAFI CCR system.
• Compatible with IDM8000 CCR.
• Compatible with Backplane mount serial communication.
• Compatible with commercial and Defence aviation CCR system.
• Remote control system for accessing CCR and allied system over serial or TCP.
• Indigenized local Support/presence in India.
• Easy in configuration using DIP switches.
Technical Specifications
Indigenized remote control interface card suitable for MAFI system CCR equipment. Compatible for IDM8000 CCR. Backplane mounted serial and TCP/Ethernet communication module for CCR remote access. IDM 8000 CCR remote control on serial and TCP protocol.
Key Features
Indigenized remote control interface card suitable for MAFI system CCR equipment. Compatible for IDM8000 CCR. Backplane mounted serial and TCP/Ethernet communication module for CCR remote access. IDM 8000 CCR remote control on serial and TCP protocol.
• Remote control: Parallel or serial interface
• Compatible with MAFI CCR system
• Copatiable with IDM8000 CCR
• Compatible with Backplane mount serial communication.
• Compatible with commercial and Defence aviation CCR system.
• Remote control system for accessing CCR and allied system over serial or TCP.
• Indigenized local Support/presence in India.
Application
• Remote control: Parallel or serial interface.
• Compatible with MAFI CCR system.
• Compatible with IDM8000 CCR.
• Compatible with Backplane mount serial communication.
• Compatible with commercial and Defence aviation CCR system.
• Remote control system for accessing CCR and allied system over serial or TCP.
• Indigenized local Support/presence in India.
• Easy in configuration using DIP switches.
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdffxintegritypublishin
Advancements in technology unveil a myriad of electrical and electronic breakthroughs geared towards efficiently harnessing limited resources to meet human energy demands. The optimization of hybrid solar PV panels and pumped hydro energy supply systems plays a pivotal role in utilizing natural resources effectively. This initiative not only benefits humanity but also fosters environmental sustainability. The study investigated the design optimization of these hybrid systems, focusing on understanding solar radiation patterns, identifying geographical influences on solar radiation, formulating a mathematical model for system optimization, and determining the optimal configuration of PV panels and pumped hydro storage. Through a comparative analysis approach and eight weeks of data collection, the study addressed key research questions related to solar radiation patterns and optimal system design. The findings highlighted regions with heightened solar radiation levels, showcasing substantial potential for power generation and emphasizing the system's efficiency. Optimizing system design significantly boosted power generation, promoted renewable energy utilization, and enhanced energy storage capacity. The study underscored the benefits of optimizing hybrid solar PV panels and pumped hydro energy supply systems for sustainable energy usage. Optimizing the design of solar PV panels and pumped hydro energy supply systems as examined across diverse climatic conditions in a developing country, not only enhances power generation but also improves the integration of renewable energy sources and boosts energy storage capacities, particularly beneficial for less economically prosperous regions. Additionally, the study provides valuable insights for advancing energy research in economically viable areas. Recommendations included conducting site-specific assessments, utilizing advanced modeling tools, implementing regular maintenance protocols, and enhancing communication among system components.
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...Amil Baba Dawood bangali
Contact with Dawood Bhai Just call on +92322-6382012 and we'll help you. We'll solve all your problems within 12 to 24 hours and with 101% guarantee and with astrology systematic. If you want to take any personal or professional advice then also you can call us on +92322-6382012 , ONLINE LOVE PROBLEM & Other all types of Daily Life Problem's.Then CALL or WHATSAPP us on +92322-6382012 and Get all these problems solutions here by Amil Baba DAWOOD BANGALI
#vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore#blackmagicformarriage #aamilbaba #kalajadu #kalailam #taweez #wazifaexpert #jadumantar #vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore #blackmagicforlove #blackmagicformarriage #aamilbaba #kalajadu #kalailam #taweez #wazifaexpert #jadumantar #vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore #Amilbabainuk #amilbabainspain #amilbabaindubai #Amilbabainnorway #amilbabainkrachi #amilbabainlahore #amilbabaingujranwalan #amilbabainislamabad
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
DIWE - File handling with PHP
1. Diploma in Web Engineering
Module VIII: File handling with PHP
Rasan Samarasinghe
ESOFT Computer Studies (pvt) Ltd.
No 68/1, Main Street, Pallegama, Embilipitiya.
2. Contents
1. include and require Statements
2. include and require
3. include_once Statement
4. Validating Files
5. file_exists() function
6. is_dir() function
7. is_readable() function
8. is_writable() function
9. is_executable() function
10. filesize() function
11. filemtime() function
12. filectime() function
13. fileatime() function
14. Creating and deleting files
15. touch() function
16. unlink() function
17. File reading, writing and appending
18. Open File - fopen()
19. Close File - fclose()
20. Read File - fread()
21. Read Single Line - fgets()
22. Check End-Of-File - feof()
23. Read Single Character - fgetc()
24. Seek File - fseek()
25. Write File - fwrite()
26. Write File - fputs()
27. Lock File - flock()
28. Working with Directories
29. Create directory - mkdir()
30. Remove directory - rmdir()
31. Open directory - opendir()
32. Read directory - readdir()
3. include and require Statements
The include and require statements takes all the
text/code/markup that exists in the specified file and
copies it into the file that uses the include statement.
Syntax:
include 'filename';
or
require 'filename';
5. include statement example 1 (index.php file)
<html>
<body>
<div>
<?php include 'menu.php';?>
</div>
<h1>Welcome to Esoft Metro Campus!</h1>
<p>The leader in professional ICT education.</p>
</body>
</html>
7. include statement example 2 (index.php file)
<html>
<body>
<h1>Welcome to Wegaspace!</h1>
<p>The most unique wap community ever!</p>
<?php
include 'footer.php';
showFooter();
?>
</body>
</html>
8. include and require
The include and require statements are identical,
except upon failure:
• require will produce a fatal error
(E_COMPILE_ERROR) and stop the script
• include will only produce a warning (E_WARNING)
and the script will continue
9. include_once Statement
The require_once() statement will check if the file
has already been included, and if so, not include
(require) it again.
Syntax:
include_once 'filename';
12. Validating Files
• file_exists() function
• is_dir() function
• is_readable() function
• is_writable() function
• is_executable() function
• filesize() function
• filemtime() function
• filectime() function
• fileatime() function
13. file_exists() function
The file_exists() function checks whether or not a
file or directory exists.
This function returns TRUE if the file or directory
exists, otherwise it returns FALSE.
Syntax:
file_exists(path)
15. is_dir() function
The is_dir() function checks whether the specified
file is a directory.
This function returns TRUE if the directory exists.
Syntax:
is_dir(file)
16. is_dir() function
$file = "images";
if(is_dir($file)){
echo ("$file is a directory");
} else {
echo ("$file is not a directory");
}
17. is_readable() function
The is_readable() function checks whether the
specified file is readable.
This function returns TRUE if the file is readable.
Syntax:
is_readable(file)
18. is_readable() function
$file = "test.txt";
if(is_readable($file)){
echo ("$file is readable");
} else {
echo ("$file is not readable");
}
19. is_writable() function
The is_writable() function checks whether the
specified file is writeable.
This function returns TRUE if the file is writeable.
Syntax:
is_writable(file)
20. is_writable() function
$file = "test.txt";
if(is_writable($file)) {
echo ("$file is writeable");
} else {
echo ("$file is not writeable");
}
21. is_executable() function
The is_executable() function checks whether the
specified file is executable.
This function returns TRUE if the file is executable.
Syntax:
is_executable(file)
22. is_executable() function
$file = "setup.exe";
if(is_executable($file)) {
echo ("$file is executable");
} else {
echo ("$file is not executable");
}
23. filesize() function
The filesize() function returns the size of the
specified file.
This function returns the file size in bytes on
success or FALSE on failure.
Syntax:
filesize(filename)
25. filemtime() function
The filemtime() function returns the last time the
file content was modified.
This function returns the last change time as a Unix
timestamp on success, FALSE on failure.
Syntax:
filemtime(filename)
27. filectime() function
The filectime() function returns the last time the
specified file was changed.
This function returns the last change time as a Unix
timestamp on success, FALSE on failure.
Syntax:
filectime(filename)
29. fileatime() function
The fileatime() function returns the last access time
of the specified file.
This function returns the last access time as a Unix
timestamp on success, FALSE on failure.
Syntax:
fileatime(filename)
32. touch() function
The touch() function sets the access and
modification time of the specified file.
This function returns TRUE on success, or FALSE on
failure.
Syntax:
touch(filename, time, atime)
34. unlink() function
The unlink() function deletes a file.
This function returns TRUE on success, or FALSE on
failure.
Syntax:
unlink(filename, context)
35. unlink() function
$file = "test.txt";
if (!unlink($file)) {
echo ("Error deleting $file");
} else {
echo ("Deleted $file");
}
36. File reading, writing and appending
• Open File - fopen()
• Close File - fclose()
• Read File - fread()
• Read Single Line - fgets()
• Check End-Of-File - feof()
• Read Single Character - fgetc()
• Seek File - fseek()
• Write File - fwrite()
• Write File - fputs()
• Lock File - flock()
37. Open File - fopen()
The fopen() function opens a file or URL.
If fopen() fails, it returns FALSE and an error on
failure.
Syntax:
fopen(filename, mode, include_path, context)
38. File open modes
Modes Description
r Open a file for read only. File pointer starts at the beginning of the file
w
Open a file for write only. Erases the contents of the file or creates a new
file if it doesn't exist. File pointer starts at the beginning of the file
a
Open a file for write only. The existing data in file is preserved. File pointer
starts at the end of the file. Creates a new file if the file doesn't exist
x
Creates a new file for write only. Returns FALSE and an error if file already
exists
r+ Open a file for read/write. File pointer starts at the beginning of the file
w+
Open a file for read/write. Erases the contents of the file or creates a new
file if it doesn't exist. File pointer starts at the beginning of the file
a+
Open a file for read/write. The existing data in file is preserved. File pointer
starts at the end of the file. Creates a new file if the file doesn't exist
x+
Creates a new file for read/write. Returns FALSE and an error if file already
exists
40. Close File - fclose()
The fclose() function closes an open file.
This function returns TRUE on success or FALSE on
failure.
Syntax:
fclose(file)
41. Close File - fclose()
$file = fopen("test.txt","r");
//some code to be executed
fclose($file);
42. Read File - fread()
The fread() reads from an open file.
The function will stop at the end of the file or when it
reaches the specified length, whichever comes first.
This function returns the read string, or FALSE on
failure.
Syntax:
fread(file, length)
44. Read Single Line - fgets()
The fgets() function returns a line from an open file.
The fgets() function stops returning on a new line,
at the specified length, or at EOF, whichever comes
first.
This function returns FALSE on failure.
Syntax:
fgets(file, length)
45. Read Single Line - fgets()
$file = fopen("test.txt","r");
echo fgets($file). "<br />";
fclose($file);
46. Check End-Of-File - feof()
The feof() function checks if the "end-of-file" (EOF)
has been reached.
This function returns TRUE if an error occurs, or if
EOF has been reached. Otherwise it returns FALSE.
Syntax:
feof(file)
47. Check End-Of-File - feof()
$file = fopen("test.txt", "r");
//Output a line of the file until the end is reached
while(! feof($file)) {
echo fgets($file). "<br />";
}
fclose($file);
48. Read Single Character - fgetc()
The fgetc() function returns a single character from
an open file.
Syntax:
fgetc(file)
49. Read Single Character - fgetc()
$file = fopen("test2.txt", "r");
while (! feof ($file)) {
echo fgetc($file);
}
fclose($file);
50. Seek File - fseek()
The fseek() function seeks in an open file.
This function moves the file pointer from its current
position to a new position, forward or backward,
specified by the number of bytes.
This function returns 0 on success, or -1 on failure.
Seeking past EOF will not generate an error.
Syntax:
fseek(file, offset, whence)
51. Seek File - fseek()
$file = fopen("test.txt", "r");
// read first line
fgets($file);
// move back to beginning of file
fseek($file, 0);
52. Write File - fwrite()
The fwrite() writes to an open file.
The function will stop at the end of the file or when it
reaches the specified length, whichever comes first.
This function returns the number of bytes written, or
FALSE on failure.
Syntax:
fwrite(file, string, length)
54. Write File - fputs()
The fputs() writes to an open file.
The function will stop at the end of the file or when it
reaches the specified length, whichever comes first.
This function returns the number of bytes written on
success, or FALSE on failure.
Syntax:
fputs(file, string, length)
56. Lock File - flock()
The flock() function locks or releases a file.
This function returns TRUE on success or FALSE on
failure.
Syntax:
flock(file, lock, block)
58. Working with Directories
• Create directory - mkdir()
• Remove directory - rmdir()
• Open directory - opendir()
• Read directory - readdir()
59. Create directory - mkdir()
The mkdir() function creates a directory.
This function returns TRUE on success, or FALSE on
failure.
Syntax:
mkdir(path, mode, recursive, context)
61. Remove directory - rmdir()
The rmdir() function removes an empty directory.
This function returns TRUE on success, or FALSE on
failure.
Syntax:
rmdir(dir, context)
Note: The result of this function are cached. Use clearstatcache() to clear the cache.
File modification time represents when the data blocks or content are changed or modified, not including that of meta data such as ownership or ownergroup.
File change time represents the time when the meta data or inode data of a file is altered, such as the change of permissions, ownership or group.
File change time represents the time when the meta data or inode data of a file is altered, such as the change of permissions, ownership or group.
Note: The result of this function are cached. Use clearstatcache() to clear the cache.
This function can be used to create a new file
include_path Optional. Set this parameter to '1' if you want to search for the file in the include_path (in php.ini) as well
context Optional. Specifies the context of the file handle. Context is a set of options that can modify the behavior of a stream
$file = fopen("/home/test/test.gif","wb"); //B for binary safe
This function Advances internal pointer to the next line
file Required. Specifies the open file to write to
string Required. Specifies the string to write to the open file
length Optional. Specifies the maximum number of bytes to write
The fputs() function is an alias of the fwrite() function.
file Required. Specifies the open file to write to
string Required. Specifies the string to write to the open file
length Optional. Specifies the maximum number of bytes to write
Lock parameter - Required. Specifies what kind of lock to use.Possible values:
LOCK_SH - Shared lock (reader). Allow other processes to access the file
LOCK_EX - Exclusive lock (writer). Prevent other processes from accessing the file
LOCK_UN - Release a shared or exclusive lock
LOCK_NB - Avoids blocking other processes while locking
LOCK_SH - Shared lock (reader). Allow other processes to access the file
LOCK_EX - Exclusive lock (writer). Prevent other processes from accessing the file
LOCK_UN - Release a shared or exclusive lock
LOCK_NB - Avoids blocking other processes while locking
mode
Optional. Specifies permissions. By default, the mode is 0777 (widest possible access).The mode parameter consists of four numbers:
The first number is always zero
The second number specifies permissions for the owner
The third number specifies permissions for the owner's user group
The fourth number specifies permissions for everybody else
Possible values (to set multiple permissions, add up the following numbers):
1 = execute permissions
2 = write permissions
4 = read permissions
Returns the directory handle resource on success. FALSE on failure.