Skip to main content

Uploading Files

  • Chapter
  • First Online:
PHP 7 Solutions
  • 1679 Accesses

Abstract

PHP’s ability to handle forms isn’t restricted to text. It can also be used to upload files to a server. For instance, you could build a real estate web site for clients to upload pictures of their properties or a site for all your friends and relatives to upload their holiday photos. However, just because you can do it doesn’t necessarily mean that you should. Allowing others to upload material to your web site could expose you to all sorts of problems. You need to make sure that images are the right size, that they’re of suitable quality, and that they don’t contain any illegal material. You also need to ensure that uploads don’t contain malicious scripts. In other words, you need to protect your web site just as carefully as your own computer.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2019 David Powers

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Powers, D. (2019). Uploading Files. In: PHP 7 Solutions. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-4338-1_9

Download citation

Publish with us

Policies and ethics