Презентация РНР hypertext preprocessor language онлайн

На нашем сайте вы можете скачать и просмотреть онлайн доклад-презентацию на тему РНР hypertext preprocessor language абсолютно бесплатно. Урок-презентация на эту тему содержит всего 30 слайдов. Все материалы созданы в программе PowerPoint и имеют формат ppt или же pptx. Материалы и темы для презентаций взяты из открытых источников и загружены их авторами, за качество и достоверность информации в них администрация сайта не отвечает, все права принадлежат их создателям. Если вы нашли то, что искали, отблагодарите авторов - поделитесь ссылкой в социальных сетях, а наш сайт добавьте в закладки.
Презентации » Устройства и комплектующие » РНР hypertext preprocessor language



Оцените!
Оцените презентацию от 1 до 5 баллов!
  • Тип файла:
    ppt / pptx (powerpoint)
  • Всего слайдов:
    30 слайдов
  • Для класса:
    1,2,3,4,5,6,7,8,9,10,11
  • Размер файла:
    475.33 kB
  • Просмотров:
    68
  • Скачиваний:
    0
  • Автор:
    неизвестен



Слайды и текст к этой презентации:

№1 слайд
Содержание слайда:

№2 слайд
Include Files The include or
Содержание слайда: Include Files The include (or require) statement takes all the text/code/markup that exists in the specified file and copies it into the file that uses the include statement. Including files is very useful when you want to include the same PHP, HTML, or text on multiple pages of a website.

№3 слайд
Example of include lt
Содержание слайда: Example of include <!DOCTYPE html> <html> <body> <div class="menu"> <?php include 'menu.php';?> </div> <h1>Welcome to my home page!</h1> <p>Some text.</p> <p>Some more text.</p> </body> </html>

№4 слайд
PHP include vs. require The
Содержание слайда: PHP include vs. require The require statement is also used to include a file into the PHP code. However, there is one big difference between include and require; when a file is included with the include statement and PHP cannot find it, the script will continue to execute. If we do the same example using the require statement, the echo statement will not be executed because the script execution dies after the require statement returned a fatal error.

№5 слайд
File and file handleing
Содержание слайда: File and file handleing

№6 слайд
Simple syntax to read file in
Содержание слайда: Simple syntax to read file in php <?php echo readfile("webdictionary.txt"); ?>

№7 слайд
File Open Read Close lt ?php
Содержание слайда: File Open/Read/Close <?php $myfile = fopen("webdictionary.txt", "r") or die("Unable to open file!"); echo fread($myfile,filesize("webdictionary.txt")); fclose($myfile); ?>

№8 слайд
Create and write on File
Содержание слайда: Create and write on File // create file $myfile = fopen("testfile.txt", "w")

№9 слайд
Forms and Files
Содержание слайда: Forms and Files

№10 слайд
Содержание слайда:

№11 слайд
Create The Upload File PHP
Содержание слайда: Create The Upload File PHP Script <?php $target_dir = "uploads/"; $target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]); $uploadOk = 1; $imageFileType = pathinfo($target_file,PATHINFO_EXTENSION); // Check if image file is a actual image or fake image if(isset($_POST["submit"])) {     $check = getimagesize($_FILES["fileToUpload"]["tmp_name"]);     if($check !== false) {         echo "File is an image - " . $check["mime"] . ".";         $uploadOk = 1;     } else {         echo "File is not an image.";         $uploadOk = 0;     } } ?>

№12 слайд
Check if File Already Exists
Содержание слайда: Check if File Already Exists // Check if file already exists if (file_exists($target_file)) {     echo "Sorry, file already exists.";     $uploadOk = 0; }

№13 слайд
Limit File Size Check file
Содержание слайда: Limit File Size  // Check file size if ($_FILES["fileToUpload"]["size"] > 500000) {     echo "Sorry, your file is too large.";     $uploadOk = 0; } //If the file is larger than 500KB, an error message is displayed

№14 слайд
Limit File Type Allow certain
Содержание слайда: Limit File Type // Allow certain file formats if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg" && $imageFileType != "gif" ) {     echo "Sorry, only JPG, JPEG, PNG & GIF files are allowed.";     $uploadOk = 0; } //The code only allows users to upload JPG, JPEG, PNG, and GIF files. All other file types gives an error message

№15 слайд
Complete Upload File PHP
Содержание слайда: Complete Upload File PHP Script (part 1) <?php $target_dir = "uploads/"; $target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]); $uploadOk = 1; $imageFileType = pathinfo($target_file,PATHINFO_EXTENSION); // Check if image file is a actual image or fake image if(isset($_POST["submit"])) {     $check = getimagesize($_FILES["fileToUpload"]["tmp_name"]);     if($check !== false) {         echo "File is an image - " . $check["mime"] . ".";         $uploadOk = 1;     } else {         echo "File is not an image.";         $uploadOk = 0;     } }

№16 слайд
Complete Upload File PHP
Содержание слайда: Complete Upload File PHP Script (part 2) // Check if file already exists if (file_exists($target_file)) {     echo "Sorry, file already exists.";     $uploadOk = 0; } // Check file size if ($_FILES["fileToUpload"]["size"] > 500000) {     echo "Sorry, your file is too large.";     $uploadOk = 0; } // Allow certain file formats if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg" && $imageFileType != "gif" ) {     echo "Sorry, only JPG, JPEG, PNG & GIF files are allowed.";     $uploadOk = 0; }

№17 слайд
Complete Upload File PHP
Содержание слайда: Complete Upload File PHP Script (part 3) // Check if $uploadOk is set to 0 by an error if ($uploadOk == 0) {     echo "Sorry, your file was not uploaded."; // if everything is ok, try to upload file } else {     if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file)) {         echo "The file ". basename( $_FILES["fileToUpload"]["name"]). " has been uploaded.";     } else {         echo "Sorry, there was an error uploading your file.";     } } ?>

№18 слайд
PHP Images from Folder
Содержание слайда: PHP Images from Folder

№19 слайд
Glob The glob function
Содержание слайда: Glob () The glob() function returns an array of filenames or directories matching a specified pattern. This function returns an array of files/directories, or FALSE on failure.

№20 слайд
Count The count function
Содержание слайда: Count () The count() function returns the number of elements in an array.

№21 слайд
Opendir amp Readdir Opendir
Содержание слайда: Opendir () & Readdir () Opendir is function to open a directory Readdir is function to read files in a directory that is open

№22 слайд
PHP pathinfo Function The
Содержание слайда: PHP pathinfo() Function The pathinfo() function returns an array that contains information about a path. The following array elements are returned: [dirname] [basename] [extension]

№23 слайд
in array It searches for a
Содержание слайда: in_array () It searches for a value in an array

№24 слайд
lt ?php path quot images quot
Содержание слайда: <?php $path = "images/"; // path to images folder $file_count = count(glob($path . "*.{png,jpg,jpeg,gif}", GLOB_BRACE)); if($file_count > 0) { $fp = opendir($path); while($file = readdir($fp)) { $ext = pathinfo($file, PATHINFO_EXTENSION); $ext_array = ['png', 'jpg', 'jpeg', 'gif']; if (in_array($ext, $ext_array)) { $file_path = $path . $file;?> <div class="col-md-4 col-xs-6"> <a href="<?php echo $file_path; ?>" title="My Favorites" data-gallery><img src="<?php echo $file_path; ?>" class="img-responsive" /></a> </div> <?} } closedir($fp); } ?>

№25 слайд
PHP Error Handling
Содержание слайда: PHP Error Handling

№26 слайд
Error Handling When creating
Содержание слайда: Error Handling When creating scripts and web applications, error handling is an important part. If your code lacks error checking code, your program may look very unprofessional and you may be open to security risks. This tutorial contains some of the most common error checking methods in PHP. We will show different error handling methods: Simple "die()" statements Custom errors and error triggers Error reporting

№27 слайд
Example of Error Handling
Содержание слайда: Example of Error Handling

№28 слайд
Exception handling Exception
Содержание слайда: Exception handling Exception handling is used to change the normal flow of the code execution if a specified error (exceptional) condition occurs. This condition is called an exception. This is what normally happens when an exception is triggered: The current code state is saved The code execution will switch to a predefined (custom) exception handler function Depending on the situation, the handler may then resume the execution from the saved code state, terminate the script execution or continue the script from a different location in the code

№29 слайд
Exception handling example
Содержание слайда: Exception handling example When an exception is thrown, the code following it will not be executed, and PHP will try to find the matching "catch" block. If an exception is not caught, a fatal error will be issued with an "Uncaught Exception" message.

№30 слайд
Example of Try, throw and
Содержание слайда: Example of Try, throw and catch <?php //create function with an exception function checkNum($number) {   if($number>1) {     throw new Exception("Value must be 1 or below");   }   return true; } //trigger exception in a "try" block try {   checkNum(2);   //If the exception is thrown, this text will not be shown   echo 'If you see this, the number is 1 or below'; } //catch exception catch(Exception $e) {   echo 'Message: ' .$e->getMessage(); } ?>

Скачать все slide презентации РНР hypertext preprocessor language одним архивом: