by admin

Processing Files In Php

Processing Files In Php 9,9/10 106 votes
Php

Most of my website is in my root directory. And In that directory there is 'css', 'functions', 'images' folder. Everything works fine when I include php files within index.php or any other root file. It includes it fine and executes it fine.But problem occurres when I made folder 'blog'.

Introductory statistics 8th edition pdf

File Processing In Python

File

So this is totally new and separate root folder with CMS and its own 'root' files. And I try to include css from main root directory or some php files from 'functions' folder in main root directory, Everything breaks down. I know I have to include it as./functions/myfile.com. But this files includes some other files so it just wont work properly and won't be able to include other files properly.Is there any idea how to fix this problem? If I understand you correctly, You have two folders, one houses your php script that you want to include into a file that is in another folder?If this is the case, you just have to follow the trail the right way.Let's assume your folders are set up like this: rootincludesphpscriptsscript.phpblogcontentindex.phpIf this is the proposed folder structure, and you are trying to include the 'Script.php' file into your 'index.php' folder, you need to include it this way: include('./././includes/phpscripts/script.php');The way I do it is visual. I put my mouse pointer on the index.php (looking at the file structure), then every time I go UP a folder, I type another './' Then you have to make sure you go UP the folder structure ABOVE the folders that you want to start going DOWN into. After that, it's just normal folder hierarchy.