Well of Stars

Tips and Troubleshooting: Checking the file path

If you get a blank page, or an error along the lines of Warning: main(/one/file/path/header.php): failed to open stream: No such file or directory in /another/file/path/file.php on line 2 - if all files are correctly named and in the right folders, it may be that your file path is incorrect. To check it, try the following: create a blank file, copy and paste in

<?php phpinfo(); ?>

Save as phpinfo.php, upload it to your 'skins' folder, then open your browser and load the file. Scroll down... near the bottom there should be a section called 'php variables'. Within that, you should see _SERVER["DOCUMENT_ROOT"]. Compare this with _SERVER["SCRIPT_FILENAME"], which gives the path to the file you're looking at - what/goes/here/skins/phpinfo.php. If there are additional folders in 'what/goes/here/' that are not included in _SERVER["DOCUMENT_ROOT"], then you need to add these in your cookies.php file, before skins/$newskin/header"; and skins/$newskin/footer";, and in the include for cookies.php at the top of each of your content pages.

Delete the file from your server after you've finished :)

On to tips and troubleshooting: skinning pages in subfolders
Back to contents