SlideShare uma empresa Scribd logo
1 de 9
Baixar para ler offline
0301 Using PHP Script Tags
1.pptx
This PHP program is a simple
example of how PHP script tags
can be used within an HTML file
to dynamically generate content.
The program outputs a title, a
heading, some paragraphs, and
two lines of text that display the
current date and time.
Here's what the code looks like:
1.pptx
• The opening ‘html’ tag indicates the
beginning of an HTML document.
• The ‘head’ section contains metadata about
the web page, such as the title (which
appears in the browser’s title bar), and any
stylesheets, scripts, or other resources that
the page needs to load.
• The ‘title’ element is used to specify the title
of the web page. In this case, it’s “0301 Using
PHP Script Tags”.
• The ‘style’ element is used to define CSS
styles that apply to elements in the HTML
document. The CSS code inside the ‘style’
element sets the font family to Arial,
Helvetica, sans-serif, and the font size to 16
pixels. This means that any text on the web
page will use this font family and size by
default.
• The ‘body’ element contains the visible content of the
web page, such as text, images, and other media.
• The ‘h1’ element is used to display the main heading of
the page, which in this case is "0301 Using PHP Script
Tags".
• The ‘p’ element is used to display a paragraph of text. In
this case, it asks the question "What are script tags and
why do we need them to run PHP?".
• The PHP code block starts with the ‘<?php’ tag, which
indicates that the code inside the tags should be
interpreted as PHP code by the server before being sent
to the browser.
• The $today variable is assigned the value of the current
date and time using the date function, which returns a
string in the format 'Y-m-d h:g:s', representing year,
month, day, hour, minute, and second.
• • The print statement outputs a string with the current
date and time, embedded inside HTML tags to format it
as bold text within a paragraph element (<p><b>Today is
$today </b></p>).
• The second PHP code block again uses the print
statement to output a similar string as the first block, but
with the word "STILL" added to indicate that the variable
$today still contains the same value as before.
• The closing body and html tags indicate the end of the
HTML document.
Overall, this program demonstrates how to use PHP code
to dynamically generate content on a web page. The PHP
code retrieves the current date and time, and then inserts
it into the HTML output using the print statement. The
resulting web page will display the current date and time
twice, along with some explanatory text.

Mais conteúdo relacionado

Semelhante a 1.pptx

IT8005 Electronic Commerces Notes UNIT 1
IT8005 Electronic Commerces Notes UNIT 1IT8005 Electronic Commerces Notes UNIT 1
IT8005 Electronic Commerces Notes UNIT 1ArunsunaiComputer
 
Lecture 2 introduction to html basics
Lecture 2 introduction to html basicsLecture 2 introduction to html basics
Lecture 2 introduction to html basicsAliMUSSA3
 
gdsc-html-ppt.pptx
gdsc-html-ppt.pptxgdsc-html-ppt.pptx
gdsc-html-ppt.pptxyuvakiran15
 
web development.pdf
web development.pdfweb development.pdf
web development.pdfBagHarki
 
Web Development 1 (HTML & CSS)
Web Development 1 (HTML & CSS)Web Development 1 (HTML & CSS)
Web Development 1 (HTML & CSS)ghayour abbas
 
Web forms and html (lect 1)
Web forms and html (lect 1)Web forms and html (lect 1)
Web forms and html (lect 1)Salman Memon
 
HTML introduction for beginners Slides .pptx
HTML introduction for beginners Slides .pptxHTML introduction for beginners Slides .pptx
HTML introduction for beginners Slides .pptxwewit44414
 
Web_Devp_HTML_CSS00jfhfghhdf0000000.pptx
Web_Devp_HTML_CSS00jfhfghhdf0000000.pptxWeb_Devp_HTML_CSS00jfhfghhdf0000000.pptx
Web_Devp_HTML_CSS00jfhfghhdf0000000.pptxgauravpurola
 
Module 1 - Introduction to HTML.pdf
Module 1 - Introduction to HTML.pdfModule 1 - Introduction to HTML.pdf
Module 1 - Introduction to HTML.pdfHumphrey Humphrey
 
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvZahouAmel1
 
Vskills certified html5 developer Notes
Vskills certified html5 developer NotesVskills certified html5 developer Notes
Vskills certified html5 developer NotesVskills
 
Vskills certified html designer Notes
Vskills certified html designer NotesVskills certified html designer Notes
Vskills certified html designer NotesVskills
 
MTA html5 text_graphics_media
MTA html5 text_graphics_mediaMTA html5 text_graphics_media
MTA html5 text_graphics_mediaDhairya Joshi
 
Computer fundamentals-internet p2
Computer fundamentals-internet p2Computer fundamentals-internet p2
Computer fundamentals-internet p2Leo Mark Villar
 

Semelhante a 1.pptx (20)

IT8005 Electronic Commerces Notes UNIT 1
IT8005 Electronic Commerces Notes UNIT 1IT8005 Electronic Commerces Notes UNIT 1
IT8005 Electronic Commerces Notes UNIT 1
 
Lecture 2 introduction to html basics
Lecture 2 introduction to html basicsLecture 2 introduction to html basics
Lecture 2 introduction to html basics
 
gdsc-html-ppt.pptx
gdsc-html-ppt.pptxgdsc-html-ppt.pptx
gdsc-html-ppt.pptx
 
web development.pdf
web development.pdfweb development.pdf
web development.pdf
 
Presentation html
Presentation   htmlPresentation   html
Presentation html
 
Web Development 1 (HTML & CSS)
Web Development 1 (HTML & CSS)Web Development 1 (HTML & CSS)
Web Development 1 (HTML & CSS)
 
Introduction to html
Introduction to htmlIntroduction to html
Introduction to html
 
Web forms and html (lect 1)
Web forms and html (lect 1)Web forms and html (lect 1)
Web forms and html (lect 1)
 
HTML introduction for beginners Slides .pptx
HTML introduction for beginners Slides .pptxHTML introduction for beginners Slides .pptx
HTML introduction for beginners Slides .pptx
 
HTML practical file
HTML practical fileHTML practical file
HTML practical file
 
Web_Devp_HTML_CSS00jfhfghhdf0000000.pptx
Web_Devp_HTML_CSS00jfhfghhdf0000000.pptxWeb_Devp_HTML_CSS00jfhfghhdf0000000.pptx
Web_Devp_HTML_CSS00jfhfghhdf0000000.pptx
 
Module 1 - Introduction to HTML.pdf
Module 1 - Introduction to HTML.pdfModule 1 - Introduction to HTML.pdf
Module 1 - Introduction to HTML.pdf
 
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
 
Vskills certified html5 developer Notes
Vskills certified html5 developer NotesVskills certified html5 developer Notes
Vskills certified html5 developer Notes
 
Vskills certified html designer Notes
Vskills certified html designer NotesVskills certified html designer Notes
Vskills certified html designer Notes
 
html
htmlhtml
html
 
HTML-INTRO.pptx
HTML-INTRO.pptxHTML-INTRO.pptx
HTML-INTRO.pptx
 
MTA html5 text_graphics_media
MTA html5 text_graphics_mediaMTA html5 text_graphics_media
MTA html5 text_graphics_media
 
Computer fundamentals-internet p2
Computer fundamentals-internet p2Computer fundamentals-internet p2
Computer fundamentals-internet p2
 
Let me design
Let me designLet me design
Let me design
 

Último

Flutter the Future of Mobile App Development - 5 Crucial Reasons.pdf
Flutter the Future of Mobile App Development - 5 Crucial Reasons.pdfFlutter the Future of Mobile App Development - 5 Crucial Reasons.pdf
Flutter the Future of Mobile App Development - 5 Crucial Reasons.pdfMind IT Systems
 
Revolutionize Your Field Service Management with FSM Grid
Revolutionize Your Field Service Management with FSM GridRevolutionize Your Field Service Management with FSM Grid
Revolutionize Your Field Service Management with FSM GridMathew Thomas
 
Mobile App Development process | Expert Tips
Mobile App Development process | Expert TipsMobile App Development process | Expert Tips
Mobile App Development process | Expert Tipsmichealwillson701
 
If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...
If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...
If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...Maxim Salnikov
 
Practical Advice for FDA’s 510(k) Requirements.pdf
Practical Advice for FDA’s 510(k) Requirements.pdfPractical Advice for FDA’s 510(k) Requirements.pdf
Practical Advice for FDA’s 510(k) Requirements.pdfICS
 
CYBER SECURITY AND CYBER CRIME COMPLETE GUIDE.pLptx
CYBER SECURITY AND CYBER CRIME COMPLETE GUIDE.pLptxCYBER SECURITY AND CYBER CRIME COMPLETE GUIDE.pLptx
CYBER SECURITY AND CYBER CRIME COMPLETE GUIDE.pLptxBarakaMuyengi
 
Enterprise Content Managements Solutions
Enterprise Content Managements SolutionsEnterprise Content Managements Solutions
Enterprise Content Managements SolutionsIQBG inc
 
8 key point on optimizing web hosting services in your business.pdf
8 key point on optimizing web hosting services in your business.pdf8 key point on optimizing web hosting services in your business.pdf
8 key point on optimizing web hosting services in your business.pdfOffsiteNOC
 
Large Scale Architecture -- The Unreasonable Effectiveness of Simplicity
Large Scale Architecture -- The Unreasonable Effectiveness of SimplicityLarge Scale Architecture -- The Unreasonable Effectiveness of Simplicity
Large Scale Architecture -- The Unreasonable Effectiveness of SimplicityRandy Shoup
 
Boost Efficiency: Sabre API Integration Made Easy
Boost Efficiency: Sabre API Integration Made EasyBoost Efficiency: Sabre API Integration Made Easy
Boost Efficiency: Sabre API Integration Made Easymichealwillson701
 
Unlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insightsUnlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insightsconfluent
 
Steps to Successfully Hire Ionic Developers
Steps to Successfully Hire Ionic DevelopersSteps to Successfully Hire Ionic Developers
Steps to Successfully Hire Ionic Developersmichealwillson701
 
renewable energy renewable energy renewable energy renewable energy
renewable energy renewable energy renewable energy  renewable energyrenewable energy renewable energy renewable energy  renewable energy
renewable energy renewable energy renewable energy renewable energyjeyasrig
 
Einstein Copilot Conversational AI for your CRM.pdf
Einstein Copilot Conversational AI for your CRM.pdfEinstein Copilot Conversational AI for your CRM.pdf
Einstein Copilot Conversational AI for your CRM.pdfCloudMetic
 
openEuler Community Overview - a presentation showing the current scale
openEuler Community Overview - a presentation showing the current scaleopenEuler Community Overview - a presentation showing the current scale
openEuler Community Overview - a presentation showing the current scaleShane Coughlan
 
VuNet software organisation powerpoint deck
VuNet software organisation powerpoint deckVuNet software organisation powerpoint deck
VuNet software organisation powerpoint deckNaval Singh
 
MinionLabs_Mr. Gokul Srinivas_Young Entrepreneur
MinionLabs_Mr. Gokul Srinivas_Young EntrepreneurMinionLabs_Mr. Gokul Srinivas_Young Entrepreneur
MinionLabs_Mr. Gokul Srinivas_Young EntrepreneurPriyadarshini T
 
Unlocking AI: Navigating Open Source vs. Commercial Frontiers
Unlocking AI:Navigating Open Source vs. Commercial FrontiersUnlocking AI:Navigating Open Source vs. Commercial Frontiers
Unlocking AI: Navigating Open Source vs. Commercial FrontiersRaphaël Semeteys
 
User Experience Designer | Kaylee Miller Resume
User Experience Designer | Kaylee Miller ResumeUser Experience Designer | Kaylee Miller Resume
User Experience Designer | Kaylee Miller ResumeKaylee Miller
 

Último (20)

Flutter the Future of Mobile App Development - 5 Crucial Reasons.pdf
Flutter the Future of Mobile App Development - 5 Crucial Reasons.pdfFlutter the Future of Mobile App Development - 5 Crucial Reasons.pdf
Flutter the Future of Mobile App Development - 5 Crucial Reasons.pdf
 
Revolutionize Your Field Service Management with FSM Grid
Revolutionize Your Field Service Management with FSM GridRevolutionize Your Field Service Management with FSM Grid
Revolutionize Your Field Service Management with FSM Grid
 
Mobile App Development process | Expert Tips
Mobile App Development process | Expert TipsMobile App Development process | Expert Tips
Mobile App Development process | Expert Tips
 
If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...
If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...
If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...
 
Practical Advice for FDA’s 510(k) Requirements.pdf
Practical Advice for FDA’s 510(k) Requirements.pdfPractical Advice for FDA’s 510(k) Requirements.pdf
Practical Advice for FDA’s 510(k) Requirements.pdf
 
20140812 - OBD2 Solution
20140812 - OBD2 Solution20140812 - OBD2 Solution
20140812 - OBD2 Solution
 
CYBER SECURITY AND CYBER CRIME COMPLETE GUIDE.pLptx
CYBER SECURITY AND CYBER CRIME COMPLETE GUIDE.pLptxCYBER SECURITY AND CYBER CRIME COMPLETE GUIDE.pLptx
CYBER SECURITY AND CYBER CRIME COMPLETE GUIDE.pLptx
 
Enterprise Content Managements Solutions
Enterprise Content Managements SolutionsEnterprise Content Managements Solutions
Enterprise Content Managements Solutions
 
8 key point on optimizing web hosting services in your business.pdf
8 key point on optimizing web hosting services in your business.pdf8 key point on optimizing web hosting services in your business.pdf
8 key point on optimizing web hosting services in your business.pdf
 
Large Scale Architecture -- The Unreasonable Effectiveness of Simplicity
Large Scale Architecture -- The Unreasonable Effectiveness of SimplicityLarge Scale Architecture -- The Unreasonable Effectiveness of Simplicity
Large Scale Architecture -- The Unreasonable Effectiveness of Simplicity
 
Boost Efficiency: Sabre API Integration Made Easy
Boost Efficiency: Sabre API Integration Made EasyBoost Efficiency: Sabre API Integration Made Easy
Boost Efficiency: Sabre API Integration Made Easy
 
Unlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insightsUnlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insights
 
Steps to Successfully Hire Ionic Developers
Steps to Successfully Hire Ionic DevelopersSteps to Successfully Hire Ionic Developers
Steps to Successfully Hire Ionic Developers
 
renewable energy renewable energy renewable energy renewable energy
renewable energy renewable energy renewable energy  renewable energyrenewable energy renewable energy renewable energy  renewable energy
renewable energy renewable energy renewable energy renewable energy
 
Einstein Copilot Conversational AI for your CRM.pdf
Einstein Copilot Conversational AI for your CRM.pdfEinstein Copilot Conversational AI for your CRM.pdf
Einstein Copilot Conversational AI for your CRM.pdf
 
openEuler Community Overview - a presentation showing the current scale
openEuler Community Overview - a presentation showing the current scaleopenEuler Community Overview - a presentation showing the current scale
openEuler Community Overview - a presentation showing the current scale
 
VuNet software organisation powerpoint deck
VuNet software organisation powerpoint deckVuNet software organisation powerpoint deck
VuNet software organisation powerpoint deck
 
MinionLabs_Mr. Gokul Srinivas_Young Entrepreneur
MinionLabs_Mr. Gokul Srinivas_Young EntrepreneurMinionLabs_Mr. Gokul Srinivas_Young Entrepreneur
MinionLabs_Mr. Gokul Srinivas_Young Entrepreneur
 
Unlocking AI: Navigating Open Source vs. Commercial Frontiers
Unlocking AI:Navigating Open Source vs. Commercial FrontiersUnlocking AI:Navigating Open Source vs. Commercial Frontiers
Unlocking AI: Navigating Open Source vs. Commercial Frontiers
 
User Experience Designer | Kaylee Miller Resume
User Experience Designer | Kaylee Miller ResumeUser Experience Designer | Kaylee Miller Resume
User Experience Designer | Kaylee Miller Resume
 

1.pptx

  • 1. 0301 Using PHP Script Tags
  • 3. This PHP program is a simple example of how PHP script tags can be used within an HTML file to dynamically generate content. The program outputs a title, a heading, some paragraphs, and two lines of text that display the current date and time.
  • 4. Here's what the code looks like:
  • 6. • The opening ‘html’ tag indicates the beginning of an HTML document. • The ‘head’ section contains metadata about the web page, such as the title (which appears in the browser’s title bar), and any stylesheets, scripts, or other resources that the page needs to load. • The ‘title’ element is used to specify the title of the web page. In this case, it’s “0301 Using PHP Script Tags”. • The ‘style’ element is used to define CSS styles that apply to elements in the HTML document. The CSS code inside the ‘style’ element sets the font family to Arial, Helvetica, sans-serif, and the font size to 16 pixels. This means that any text on the web page will use this font family and size by default.
  • 7. • The ‘body’ element contains the visible content of the web page, such as text, images, and other media. • The ‘h1’ element is used to display the main heading of the page, which in this case is "0301 Using PHP Script Tags". • The ‘p’ element is used to display a paragraph of text. In this case, it asks the question "What are script tags and why do we need them to run PHP?". • The PHP code block starts with the ‘<?php’ tag, which indicates that the code inside the tags should be interpreted as PHP code by the server before being sent to the browser.
  • 8. • The $today variable is assigned the value of the current date and time using the date function, which returns a string in the format 'Y-m-d h:g:s', representing year, month, day, hour, minute, and second. • • The print statement outputs a string with the current date and time, embedded inside HTML tags to format it as bold text within a paragraph element (<p><b>Today is $today </b></p>). • The second PHP code block again uses the print statement to output a similar string as the first block, but with the word "STILL" added to indicate that the variable $today still contains the same value as before. • The closing body and html tags indicate the end of the HTML document.
  • 9. Overall, this program demonstrates how to use PHP code to dynamically generate content on a web page. The PHP code retrieves the current date and time, and then inserts it into the HTML output using the print statement. The resulting web page will display the current date and time twice, along with some explanatory text.