Your SlideShare is downloading. ×
0
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa ppt about lamp technology
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Deepa ppt about lamp technology

14,939

Published on

1 Comment
5 Likes
Statistics
Notes
No Downloads
Views
Total Views
14,939
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
913
Comments
1
Likes
5
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. LAMP TECHNOLOGY PRESENTATION BY P.DEEPA
  • 2. LAMP TECHNOLOGY <ul><li>L A M P is an acronym for a solution stack of free, open source software, originally coined from the first letters of
  • 3. Linux (operating system),
  • 4. Apache HTTP Server,
  • 5. MySQL (database software) and
  • 6. PHP. </li></ul>
  • 7. <ul><li>Linux
  • 8. Unix-like computer operating system ,open-source software where source code is provided with operating system, which can be edited according to specific needs.
  • 9. Apache
  • 10. free software/open source web server </li></ul>
  • 11. <ul><li>MySQL
  • 12. multithreaded, multi-user, SQL database management system
  • 13. PHP
  • 14. reflective programming language originally designed for producing dynamic web pages </li></ul>
  • 15. ADVANTAGES OF LAMP <ul><li>Easy to code with PHP and MySQL.
  • 16. Easy to deploy a PHP app. Once you’ve got MySQL running, simply upload your .php files.
  • 17. Develop locally
  • 18. Cheap and ubiquitous hosting </li></ul>
  • 19. INSTALLATION OF LAMP <ul><li>Download latest version of xampp for linux.
  • 20. Extract the downloaded archive file to /opt :
  • 21. tar xvfz xampp-linux-1.7.3a.tar.gz -C /opt
  • 22. start XAMPP simply calling the command :
  • 23. /opt/lampp/lampp start
  • 24. Test by typing in the following URL at web browser : http://localhost </li></ul>
  • 25. LINUX ( OPERATING SYSTEM )
  • 26. WHAT IS LINUX? <ul><li>It is an operating system.
  • 27. It is designed for to provide personal computer users a free or at very low-cost .
  • 28. It has a reputation as a very efficient &amp; fast performing systems.
  • 29. Linux was developed by Linux Torvalds at the University of Helsinki in Finland. </li></ul>
  • 30. WHY WE ARE USING LINUX? <ul><li>We dont have to buy the office system requirements separately.
  • 31. No need to buy costly hardwares for the basic need(like RAM,Processor).
  • 32. We are free from viruses no need to buy the antivirus softwares separately.. </li></ul>
  • 33. WHY WE ARE USING LINUX? Continue.. <ul><li>We can update everthing on our system with just one update manager.
  • 34. It is free from pirated software so that we can share it with others is legal.
  • 35. It wont get slow like windows operating system.
  • 36. It upgrades all installation automatically. </li></ul>
  • 37. ADVANTAGES: <ul><li>Cost.
  • 38. Security.
  • 39. Choice(freedom).
  • 40. Software.
  • 41. Hardware. </li></ul>
  • 42. DISADVANTAGES: <ul><li>Understanding.
  • 43. Compatibility.
  • 44. Alternative Programs. </li></ul>
  • 45. BASIC LINUX COMMANDS: 1. Show who is logged on and what they are doing. $ w 2.Show who is logged on. $ who
  • 46. 3.Create empty file of 0 byte $ touch 4.Remove file $ rm 5. List files. $ ls
  • 47. 6. Create/Make a new directory. $ mkdir 7. Clear the terminal screen. $clear 8.Display information on free used memory. $ free
  • 48. 9.Check current date and time. $ date 10.Compare two files. $ cmp file1 file2 11.To save and exit. Ctrl -d
  • 49. 12.Short listing of directory contents $ls - <ul><li>-a list hidden files.
  • 50. -d list the name of the current directory.
  • 51. -F show directories with a trailing &apos;/&apos;
  • 52. executable files with a trailing &apos;*&apos;.
  • 53. -t sort by time modified instead of name. </li></ul>
  • 54. Short listing of directory contents $ls- continue.. <ul><li>-g show group ownership of file in long listing
  • 55. -i print the inode number of each file
  • 56. -l long listing giving details about files and directories </li></ul>
  • 57. 13.Prints a calendar for the specified month of the specified year. $cal month year 14.It will show you the full path to the directory you are currently in. $pwd ( print working directory)
  • 58. 15.Type mv followed by the current name of a directory and the new name of the directory. $mv( change the name of a directory)
  • 59. LINUX DIRECTORY STRUCTURE
  • 60. LINUX DIRECTORIES: &lt; / &gt; <ul><li>The root directory where the Linux system begins contains only subdirectories. .
  • 61. The starting point of your directory structure.
  • 62. Every other file and directory on system is under the root directory. </li></ul>
  • 63. <ul>&lt; /boot &gt; <li>The place where Linux keeps information that it needs when booting up.
  • 64. &lt; /bin &gt;
  • 65. It contains the most important programs that the system needs to operate, such as the shells, ls, grep, and other essential things. </li></ul>
  • 66. <ul>&lt; /usr/bin &gt; <li>/usr/bin in turn contains applications for the system&apos;s users.
  • 67. &lt; /dev &gt;
  • 68. The devices that are available to a Linux system. </li></ul>
  • 69. <ul>&lt; /etc &gt; <li>The configuration files for the Linux system.
  • 70. Most of these files are text files and can be edited by hand.
  • 71. &lt; /home &gt;
  • 72. This is where users keep their personal files are allowed to write files. </li></ul>
  • 73. <ul>&lt; /lib &gt; <li>The shared libraries for programs that are dynamically linked.
  • 74. &lt; /mnt &gt;
  • 75. This directory is used for mount points.
  • 76. &lt; /sbin, /usr/sbin &gt;
  • 77. Most system administration programs are stored in these directories. </li></ul>
  • 78. <ul>&lt; /usr &gt; <li>It contains user applications and source codes, and pictures, docs, or config files .
  • 79. &lt;/usr/share&gt;
  • 80. Config files and graphics for many user apps.
  • 81. &lt; /usr/local &gt;
  • 82. This is where you install apps and other files for use on the local machine. </li></ul>
  • 83. SOME OF THE LINUX EDITORS <ul><li>ed - Original UNIX line-based editor, useful in scripts
  • 84. emacs - GNU editor and fully integrated user environment
  • 85. ex - Powerful line-based editor (integrated with vi) </li></ul>
  • 86. SOME OF THE LINUX EDITORS continue.. <ul><li>gawk - GNU awk, powerful text editor for records containing fields.
  • 87. sed - Stream-oriented (non- interactive) line-based editor
  • 88. vi - Classic screen-based editor for UNIX
  • 89. vim - Vi IMproved, enhanced support for programmers </li></ul>
  • 90. CRONTAB &amp; CRONJOB <ul><ul><li>The term cron is derived from the word chronograph .
  • 91. The Cron, at, batch Command is used for Scheduling Execution of Command according to requirements.
  • 92. Cron is a system deamon that keeps sleeping most of the time. </li></ul></ul>
  • 93. CRONTAB &amp; CRONJOB continue.. <ul><ul><li>I t typically wakes up every one minute and checks it crontab file for any jobs to be executed during this minute.
  • 94. The name of this crontab file will be the user&apos;s login name . </li></ul></ul>
  • 95. CRONTAB &amp; CRONJOB continue.. <ul><li>The Scheduled jobs will be present in the Crontab files .
  • 96. Cron tab files will be present in the
  • 97. /var/ spool/ cron/ crontabs directory .
  • 98. It Should be executed periodically at a specific day, date and time . </li></ul>
  • 99. <ul>APACHE ( HTTP SERVER ) </ul>
  • 100. WHAT IS APACHE? <ul><li>An open source web server used mostly for Unix, Linux and Solaris platforms.
  • 101. It is very secure, fast, and reliable.
  • 102. The name &amp;quot;Apache&amp;quot; derives from the word &amp;quot;patchy&amp;quot; that the Apache developers used to describe early versions of their software. </li></ul>
  • 103. <ul>IMPLEMENTATION: <li>DBM databases for authentication
  • 104. Customized responses to errors and problems
  • 105. Virtual Hosts
  • 106. Multiple DirectoryIndex directives
  • 107. It has been tested thoroughly by both developers and users. </li></ul>
  • 108. APACHE WEB SERVER <ul><li>It provides a full range of Web server features, including CGI, SSL, and virtual domains.
  • 109. Apache also supports plug-in modules for extensibility. </li></ul>
  • 110. <ul><li>The Apache Web Server has
  • 111. HTTP
  • 112. IIS
  • 113. SSL
  • 114. The Apache Web server has been ported to Windows and other network operating systems (NOS). </li></ul>
  • 115. HTTP <ul><li>HTTP is an Hypertext Transfer Protocol.
  • 116. It provides a standard for Web browsers and servers to communicate.
  • 117. It is a technical specification of a network protocol that software must implement.
  • 118. HTTP is an application layer network protocol built on top of TCP. </li></ul>
  • 119. <ul><li>HTTP clients (such as Web browsers) and servers communicate via HTTP request and response messages.
  • 120. The three main HTTP message types are
  • 121. GET, POST, and HEAD.
  • 122. HTTP utilizes TCP port 80 by default. </li></ul>
  • 123. *Though other ports such as 8080 can alternatively be used. *The HTTP also includes. ARP-(Address Resolution Protocol) <ul>DHCP-(Dynamic Host Configuration Protocol) FTP(File Transfer Protocol) </ul>
  • 124. <ul>ARP <li>ARP converts an Internet Protocol ( IP ) address to its corresponding physical network address.
  • 125. It is implemented in the device drivers of network operating systems .
  • 126. It is most commonly seen on Ethernet networks, ATM, Token Ring , and other physical networks . </li></ul>
  • 127. <ul>DHCP <li>DHCP allows a computer to join an IP -based network without having a pre-configured IP address.
  • 128. DHCP is a protocol that assigns unique IP addresses to devices, then releases and renews these addresses as devices leave and re-join the network. </li></ul>
  • 129. FTP <ul><li>FTP allows you to transfer files between two computers on the Internet.
  • 130. FTP is a simple network protocol based on Internet Protocol. </li></ul>
  • 131. SSL <ul><li>Secure Sockets Layer.
  • 132. SSL security technology helps to improve the safety of Internet communications.
  • 133. SSL is a standard for encrypted client/server communication between network devices.
  • 134. A network protocol, SSL runs on top of TCP/IP. </li></ul>
  • 135. CONFIGURATION Instead of using a point-and-click graphic user interface (GUI) or Windows Registry keys as most other modern software packages, Apache generally relies on simple text files for its configuration settings.
  • 136. CONFIGURING FILES <ul><li>It uses a system text files for managing its configuration data.
  • 137. These files appear in Apache&apos;s ./conf directory and are designed to be edited by system administrators:
  • 138. httpd.conf for general settings
  • 139. srm.conf for resource settings
  • 140. access.conf for security settings </li></ul>
  • 141. RUNNING APACHE <ul><li>Apache does not run from the inetd super server as many other network servers do.
  • 142. It is configured to run standalone for better performance for incoming HTTP requests from client web browsers. </li></ul>
  • 143. RUNNING APACHE continue.. <ul><li>A shell script wrapper is included to make starting, stopping, and restarting the server as simple as possible.
  • 144. To start up Apache for the first time, just run:
  • 145. # /usr/local/sbin/apachectl start </li></ul>
  • 146. RUNNING APACHE continue.. <ul><li>You can stop the server at any time by typing:
  • 147. # /usr/local/sbin/apachectl stop
  • 148. After making changes to the configuration file for any reason, you will need to restart the server:
  • 149. # /usr/local/sbin/apachectl restart </li></ul>
  • 150. RUNNING APACHE continue.. <ul><li>To restart Apache without aborting current connections, run:
  • 151. # /usr/local/sbin/apachectl graceful </li></ul>
  • 152. <ul><li>The family of .conf files supports most,
  • 153. but not all of Apache&apos;s configuration options.
  • 154. Other important mechanisms for managing an Apache Web server include the
  • 155. .htaccess file, the mime.types file,
  • 156. and the family of log files . </li></ul>
  • 157. MySQL(DATABASE SOFTWARE)
  • 158. WHAT IS MySQL? <ul><li>The most popular open source SQL database management system.
  • 159. It is used to add,access and process data stored in a computer database.
  • 160. It is a RDBMS store in a separate tables rather than putting all the data in one big store room.It adds speed and flexibility. </li></ul>
  • 161. <ul><li>It is very fast,reliable and easy to use,
  • 162. due to the connectivity,speed ,security.
  • 163. It works in Client/Server or embedded system.
  • 164. A large amount of contributed MySQL software is available. </li></ul>WHAT IS MySQL? continue..
  • 165. WHAT IS MySQL? continue.. <ul>It consists of multithreaded SQL server that support: <li>Different backends,
  • 166. Several different client programs,
  • 167. Libraries,
  • 168. Administration tools,
  • 169. Wide range of API&apos;s. </li></ul>
  • 170. WHY WE ARE USING MYSQL? <ul><li>It is free .
  • 171. It is fast comparing to other Database system such as PostgreSQL,mSQL.
  • 172. It is light weight yet offers a rich and highly useful function set.
  • 173. It is supported well by users community. </li></ul>
  • 174. BASIC QUERIES <ul><li>CREATE Command - is used to create a database/table.
  • 175. SELECT Command - is used to retrieve data from the database.
  • 176. DELETE Command - is used to delete data from the database. </li></ul>
  • 177. BASIC QUERY COMMANDS IN MySQL continue.. <ul><li>INSERT Command - is used to insert data into a database.
  • 178. UPDATE Command - is used to update the data in a table.
  • 179. DROP Command - is used to delete or drop the database/table. </li></ul>
  • 180. SYNTAX FOR QUERY COMMANDS 1. CREATE Command : The Create command is used to create a table by specifying the tablename, fieldnames and constraints as shown below: Syntax: $createSQL=(&amp;quot;CREATE TABLE tblName&amp;quot;);
  • 181. 2. SELECT Command : It is used to select the records from a table using its field names, &apos;*&apos; is used to select all the fields in a table. Syntax: $selectSQL=(&amp;quot;SELECT field_names FROM tablename&amp;quot;);
  • 182. 3 .DELETE Command : The Delete command is used to delete the records from a table using conditions as shown below: Syntax: $deleteSQL=(&amp;quot;DELETE * FROM tablename WHERE condition&amp;quot;);
  • 183. 4. INSERT Command : The Insert command is used to insert records into a table. The values are assigned to the field names as shown below: Syntax: $insertSQL=(&amp;quot;INSERT INTO tblname(fieldname1,fieldname2..) VALUES(value1,value2,...) &amp;quot;);
  • 184. 5. UPDATE Command : It is used to update the field values using conditions. This is done using &apos;SET&apos; and the fieldnames to assign new values to them. Syntax: $updateSQL=(&amp;quot;UPDATE Tblname SET (fieldname1=value1,fieldname2=value2,...) WHERE fldstudid=IdNumber&amp;quot;);
  • 185. 6. DROP Command: The Drop command is used to delete all the records in a table using the table name as shown below: Syntax: $dropSQL=(&amp;quot;DROP tblName&amp;quot;);
  • 186. ADVANCED QUERIES <ul><li>INNER JOIN :
  • 187. It is used to retrieve the data from all tables listed.
  • 188. REPLACE:
  • 189. It searches a character string and replaces characters found in search string. </li></ul>
  • 190. <ul><li>LTRIM :
  • 191. It removes any leading (left-hand) spaces in a character string.
  • 192. RTRIM :
  • 193. It works like LTRIM, but it removes trailing spaces. </li></ul>
  • 194. <ul><li>SIGN :
  • 195. It takes in a numeric expression and returns one of the following values based on the sign of the input number:
  • 196. − 1 - Input number is negative.
  • 197. 0 - Input number is zero.
  • 198. 1 - Input number is positive.
  • 199. Null - Input number is null. </li></ul>
  • 200. <ul><li>SQRT :
  • 201. It takes in a single numeric expression and returns its square root.
  • 202. CEILING (CEIL) :
  • 203. It rounds up to the next nearest whole number.
  • 204. F LOOR :
  • 205. It rounds down to the next nearest whole number. </li></ul>
  • 206. <ul>DATE and TIME : <li>ADD_MONTHS :
  • 207. Adds the supplied number of months to the supplied date.
  • 208. CURRENT_DATE :
  • 209. Returns the current date in the time zone set for the DB session. </li></ul>
  • 210. EXTRACT : Extracts the specified date field from the supplied date. LAST_DAY : Returns of supplied date with the day shifted to the last day of the month.
  • 211. PROCEDURES AND FUNCTIONS <ul>Subroutines and functions can be made available to a single program or many; and that, of course, is what stored procedures and stored functions are - they are procedures (or subroutines) and functions stored in the database . </ul>
  • 212. WHY USE PROCEDURES AND FUNCTIONS? The real advantage to using stored procedures and stored functions is that they provide functionality which is platform and application independant.
  • 213. WHY USE PROCEDURES &amp; FUNCTIONS? continue.. For example, a team of developers may provide: a Visual Basic application on Windows <ul><li>a Gambas application on Linux
  • 214. a PHP application on a web server </li></ul>With procedures and functions the functionality only has to be developed once.
  • 215. CREATING MySQL PROCEDURES A stored procedure is the same as a subroutine in that it cannot directly return a result, however it can receive variables that can be modified by the procedure.
  • 216. <ul>These variables are defined as: <li>in - the variable can only be used as an input to the procedure.
  • 217. out - the variable can only be used as an output from the procedure.
  • 218. inout - this is both an input to, and an output from, the procedure. </li></ul>
  • 219. Procedures are always declared as: <ul>Define the procedure name, inputs and outputs,body of the procedure. For example: delimiter // </ul>create procedure circle_area (in r double, out a double) begin set a = r * r * pi(); end //delimiter ;
  • 220. RUNNING MySQL PROCEDURES <ul><li>A MySQL stored procedure is run by using the call method:
  • 221. call circle_area(22, @a) ;
  • 222. select @a ;
  • 223. In this example 1520.5308443375 would be displayed on the screen. </li></ul>
  • 224. CREATING MYSQL FUNCTIONS Unlike stored procedures stored functions always return a result, they will also be one of two types : <ul><li>not deterministic - may produce different results for the same inputs .
  • 225. deterministic - will always produce the same result for any given inputs </li></ul>
  • 226. <ul>Like procedures, all functions are created : <li>define the function name,
  • 227. declare any inputs,
  • 228. define the data type to be returned by the function,
  • 229. state whether or not the function is deterministic,
  • 230. define the body of the function . </li></ul>
  • 231. For example : delimiter // create function circumference (r double) returns double deterministic begin declare c double; set c = 2 * r * pi(); return c; end // delimiter ;
  • 232. RUNNING MySQL FUNCTIONS Unlike stored procedures stored functions are used as part of a select statement: <ul><li>select circumference(22);
  • 233. In this case (for anyone that&apos;s interested) the result would be 138.23007675795 . </li></ul>
  • 234. IMPORT A MySQL DATABASE <ul><li>This to restore data from a backup or to import from another MySQL server.
  • 235. Start by uploading the FILE.sql file to the server where we will be running this command. </li></ul># mysql -u username -ppassword database_name &lt; FILE.sql
  • 236. EXPORT A MySQL DATABASE <ul><li>Replace username, password and database_name with your MySQL username, password and database name.File FILE.sql now holds a backup of your database, download it to your computer.
  • 237. # mysqldump -u username -ppassword database_name &gt; FILE.sql </li></ul>
  • 238. PHP
  • 239. WHAT IS PHP? <ul><li>PHP : Hypertext Preprocessor
  • 240. It is an open source software and free to download to use.
  • 241. It is a server-side scripting language, like ASP and scripts are executed on the server.
  • 242. It supports many databases ( MySQL, Informix, Oracle, Sybase, Solid, PostgreSQL, Generic ODBC, etc .) </li></ul>
  • 243. <ul><li>The PHP is very simple for a beginner, but offers many advanced features for a professional script writer.
  • 244. Three main areas where PHP scripts are used :
  • 245. Server-side scripting
  • 246. Command line scripting
  • 247. Writing desktop applications </li></ul>
  • 248. ADVANTAGES <ul><li>It Support for both structural and Oops programming.
  • 249. It can plugin with most of the databasesand use of variables $$var.
  • 250. It support services using protocols such as LDAP, IMAP, SNMP, NNTP, POP3, HTTP, COM (on Windows) </li></ul>
  • 251. ADVANTAGES continue.. <ul><li>PHP has extremely useful text processing features, from the POSIX Extended or Perl regular expressions to parsing XML documents.
  • 252. Easy deployment and cost effective hosting.
  • 253. Power ful built in functions. </li></ul>
  • 254. DISADVANTAGES <ul><li>Security flaws due to unknown vulnerabilities .
  • 255. Not good to create desktop Applications. </li></ul>
  • 256. WHY WE ARE USING PHP? <ul><li>It enables programmers to create applications that will run on just about any computer, regardless of operating system.
  • 257. If the computer can run web server software, the PHP application is portable across operating systems and environments ... PC, Mac, Linux, Windows, Internet, Intranet, etc. </li></ul>
  • 258. BASIC PHP SYNTAX <ul>* A PHP scripting block always starts with &lt;?php ends with ?&gt; * For maximum compatibility, it is recommended that to use the standard form (&lt;?php) rather than the shorthand form. </ul>
  • 259. <ul><li>Each code line must end with a semicolon.
  • 260. There are two basic statements to output text with PHP:
  • 261. echo and print
  • 262. Note :
  • 263. The file must have a .php extension.
  • 264. If the file has a .html extension, the PHP code will not be executed. </li></ul>
  • 265. PHP . ini <ul><li>It is a configuration file that is used to customize behavior of PHP at runtime.
  • 266. The Settings in which upload directory, register global variables, display errors, log errors, max uploading size setting, maximum time to execute a script and other configurations is written in this file. </li></ul>
  • 267. PHP .ini continue.. <ul><li>The configuration file ( php.ini ) is read when PHP starts up.
  • 268. In order for PHP to read it, it must be named &apos;php.ini&apos; .
  • 269. The php.ini directives allows us to set configure our PHP setup. </li></ul>
  • 270. <ul>The parse_ini_file() function parses a configuration ( ini ) file and returns the settings in it in an array. Syntax : parse_ini_file(file,process_sections) <li>file- Required. Specifies the ini file to check.
  • 271. process_sections -Optional.Default is FALSE. </li></ul>
  • 272. <ul><li>The following reserved words must not be used as keys for ini files:
  • 273. null, yes, no, true, and false.
  • 274. The following reserved characters that must not be used in the keys:
  • 275. {}|&amp;~![()&amp;quot;. </li></ul>
  • 276. CONTENTS OF &amp;quot;test.ini&amp;quot; [names] me = Robert you = Peter [urls] first = &amp;quot;http://www.example.com&amp;quot; second = &amp;quot;http://www.w3schools.com&amp;quot;
  • 277. PHP CODE: &lt;?php print_r(parse_ini_file(&amp;quot;test.ini&amp;quot;)); ?&gt; OUTPUT : ( [me] =&gt; Robert [you] =&gt; Peter [first] =&gt; http://www.example.com [second] =&gt; http://www.w3schools.com )
  • 278. THANK YOU..

×