Hello!
I am currently following a tutorial which will enable users to choose different skins (interfaces, I guess) for my website. This tutorial can be found
here. I have followed every instruction as closely as possible, but my website is throwing back errors at me (as you can see
here). I'll try my best to tell you what lines of my scripting contain errors, but I can't promise anything!
Just a note, my index page is constructed very simply at the moment. All it has is the cookie php part, the header php part, a sentence and my footer php part:
<?php include ("e:\domains\o\oh-crud.co.uk\user\htdocs\cookiecheck.php");
$headervar="e:\domains\o\oh-crud.co.uk\user\htdocs\nav\header";
$extension=".php";
include($headervar.$skin.$extension);?>
Hello there
<?php
$footervar = "e:\domains\o\oh-crud.co.uk\user\htdocs\nav\footer";
$extension = ".php";
include ($footervar.$skin.$extension);
?>
I apologise for my lack of whitespace, I'm not an advanced PHP programmer as you can see! So anyway, here's the first part of the error:
Warning: main(e:\domains\o\oh-crud.co.uk\user\htdocs av\header1.php): failed to open stream: Invalid argument in e:\domains\o\oh-crud.co.uk\user\htdocs\index.php on line 3
I think it points to the cookiecheck.php file, or the path to it. I'm not exactly sure. I know the paths above seem quite different, but I contacted my host (fasthosts.co.uk) and they gave me the above information, as well as another possible path which does not work either.
Warning: main(): Failed opening 'e:\domains\o\oh-crud.co.uk\user\htdocs av\header1.php' for inclusion (include_path='.;c:\php4\pear') in e:\domains\o\oh-crud.co.uk\user\htdocs\index.php on line 3
This particular error confuses me a lot! I don't personally have php4 or pear, so it might be something to do with my hosting company. Line 3 again points to my cookiecheck.php file, I think. Again, I suck at PHP!
Warning: main(e:\domains\o\oh-crud.co.uk\user\htdocs av\footer1.php): failed to open stream: Invalid argument in e:\domains\o\oh-crud.co.uk\user\htdocs\index.php on line 10
and
Warning: main(): Failed opening 'e:\domains\o\oh-crud.co.uk\user\htdocs av\footer1.php' for inclusion (include_path='.;c:\php4\pear') in e:\domains\o\oh-crud.co.uk\user\htdocs\index.php on line 10
These parts are the same as what I mentioned above, just the error is on different lines, which leads me to think that it has something to do with the header and footer files.
Finally, I will leave my cookiecheck.php file with you, if it will be of any help:
<?
$total_skins = 1;
$default_skin = 1;
if (isset($_REQUEST['newskin'])) {
$newskin=(int)$_REQUEST['newskin'];
if ( ($newskin<1) OR ($newskin>$total_skins) ) $newskin=$default_skin;
} elseif (isset($_REQUEST['skin'])) {
$newskin=(int)$skin;
if ( ($skin<1) OR ($skin>$total_skins) ) $newskin=$default_skin;
} else $newskin=$default_skin;
$skin=$newskin;
setcookie ('skin', "", time() - 3600);
setcookie('skin',$newskin,time()+(86400*365),'/');
setcookie('skin',$newskin,time()+(86400*365),'/','.oh-crud.co.uk');
$skin=$newskin;
$headervar = "//iis669/domains/o/oh-crud.co.uk/htdocs/nav/header";
$footervar = "//iis669/domains/o/oh-crud.co.uk/htdocs/nav/footer";
$extension = ".php";
?>
I would literally be the happiest girl alive if you could help me! I'm sorry it's a bit long winded but I tried to include everything. Thanks
