Presentation is loading. Please wait.

Presentation is loading. Please wait.

PHP File Manipulation. File Upload and php.ini ;;;;;;;;;;;;;;; ; File Uploads ; ;;;;;;;;;;;;;;;; ; Whether to allow HTTP file uploads. file_uploads =

Similar presentations


Presentation on theme: "PHP File Manipulation. File Upload and php.ini ;;;;;;;;;;;;;;; ; File Uploads ; ;;;;;;;;;;;;;;;; ; Whether to allow HTTP file uploads. file_uploads ="— Presentation transcript:

1 PHP File Manipulation

2 File Upload and php.ini ;;;;;;;;;;;;;;; ; File Uploads ; ;;;;;;;;;;;;;;;; ; Whether to allow HTTP file uploads. file_uploads = On ; Temporary directory for HTTP uploaded files (will use system default if not ; specified). upload_tmp_dir = /tmp ; Maximum allowed size for uploaded files. upload_max_filesize = 8M

3 Uploading Files in PHP upload.html upload.php – As is it a dangerous file… – Assumes authentication – Users could overwrite existing files

4 Surfing the Filesystem… browsedir.php browsedir2.php scandir.php filedetails.php – basename() and dirname()

5 Sessions Session support in PHP consists of a way to preserve certain data across subsequent accesses. This enables you to build more customized applications and increase the appeal of your web site. A visitor accessing your web site is assigned a unique id, the so-called session id. This is either stored in a cookie on the user side or is propagated in the URL.

6 PHP Session Security Without SSL or other encryption your session data is visible!

7 PHP is Software! (and should be Engineered) Plan out your project – get user input! Reuse code – both internally and via Open Source Write Maintainable (and scalable) Code – Use Standards (variable and function naming) – Commenting – Indentation Breakup code into manageable chunks Implement a versioning system Separate Logic and content (PHP, HTML and CSS) Prototype and Test!

8 Create PHPbookmark App

9 Files in PHPbookmark


Download ppt "PHP File Manipulation. File Upload and php.ini ;;;;;;;;;;;;;;; ; File Uploads ; ;;;;;;;;;;;;;;;; ; Whether to allow HTTP file uploads. file_uploads ="

Similar presentations


Ads by Google