You just have to create a .htaccess file in which you can paste the following code and then upload that file into wp-content/uploads directory this would disable PHP execution in your wp-content/uploads directory.
<Files *.php>
deny from all
</Files>
You can also use this code to disable php execution in any directory of any type of website.