Is it secure to keep my webpages(php pages) inside public_html folder on a production server?

Is it secure to keep my webpages(php pages) inside public_html folder on a production server?

This is my first php project and I'm going make it online very soon. Recently i have read some articles about not keeping the php scripts inside public folder because if the server is not configured correctly php scripts might be visible as pure text and that is a big security concern if those scripts have sensitive information(like DB credentials etc.). But i believe, I shouldn't be concerned. As my php pages are mainly consist of multiple include/require. Here is an example:

This is my first php project and I'm going make it online very soon. Recently i have read some articles about not keeping the php scripts inside public folder because if the server is not configured correctly php scripts might be visible as pure text and that is a big security concern if those scripts have sensitive information(like DB credentials etc.). But i believe, I shouldn't be concerned. As my php pages are mainly consist of multiple include/require. Here is an example:

home.php

<?php require_once ('../resources/app_config.php'); require_once ('../resources/includes/functions.php'); require_once ('../resources/includes/header.php'); ?> <body> The body elements... </body> <?php require_once ('../resources/includes/footer.php'); ?>

Here is the directory structure of my project:

resources
  |_ app_config.php
  |_ includes
       |_ functions.php
public_html
  |_ css_dir
  |_ js_dir
  |_ images_dir

index.php home.php profile.php

so my question is should I be concerned about moving my php pages out of the public folder or there is nothing to concern ?? Thank you.

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

PHP Interview Questions with Solutions: Prepare for PHP Interview

Prepare for PHP Interviews. Set Variable With php.ini File. Logic & Output Behind PHP Code Segment. Class Concept, Error & Functions in PHP. Start PHP Now!

PHP Web Application Development Company

As a top **PHP Web Application Development Company in USA**[https://www.dataeximit.com/php-development-services/](https://www.dataeximit.com/php-development-services/ "https://www.dataeximit.com/php-development-services/"), we at Data EximIT have...

Advantages of Hiring PHP Developer for your Website Project

PHP - Hypertext pre-processor, a scripting language used by many people in developing web pages, but most of us are unaware even of the full form. To train someone and make them learn this whole language is as difficult and time-consuming as it is...