From the course: PHP: Creating Secure Websites
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
PHP on a shared host - PHP Tutorial
From the course: PHP: Creating Secure Websites
PHP on a shared host
- [Instructor] In this movie, we'll talk about how to configure PHP when it's being used on a shared host. The best place to configure PHP is via the php.ini file. If you have control over your web server, then that's what you should do. But on a shared hosting server, you may not have the ability to configure php.ini. The ISP may have control over that file. If that's the case, you can use a PHP function called ini_set to configure PHP at runtime. This will allow you to have a different configuration from other PHP users on the same server. I suggest putting your configurations in one PHP file that gets required at the beginning of every script. That will keep them consistent, it will make them easy to manage, and it will ensure that they get set at the start of every web request. Here's an example using ini_set to configure error reporting. Inside a set of PHP tags we call ini_set, and then in parentheses two arguments,…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.