Page 1 of 1

Help with PHP and linking to a file

Posted: Thu Nov 04, 2010 3:48 pm
by rjtyrell
Hi,

I am trying to get frontpage slideshow working and so far:-

// 1. Enter the name of your slideshow
$slideshow="myslideshow";

// 2. Enter your site's URL (without trailing slash)
$siteURL="http://www.thevillagers.co.uk";

// 3. Enter the absolute path of your site on the server (without trailing slash)
$sitePath="/home/thevilla/public_html";

// Include the slideshow
include_once($sitePath."/fpss/fpss.php"); // DO NO EDIT THIS LINE

Which are the absolute paths as far as I am aware?

Uploading this PHP file I now get errors saying:- http://www.thevillagers.co.uk/example.php

Warning: require_once(/home/thevilla/public_html/fpss/slideshows/myslideshow/p arameters.php) [function.require-once]: failed to open stream: No such file or directory in /home/thevilla/public_html/fpss/fpss.php on line 16

Fatal error: require_once() [function.require]: Failed opening required '/home/thevilla/public_html/fpss/slideshows/myslideshow/parameters.ph p' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/thevilla/public_html/fpss/fpss.php on line 16


In regard to this error the files are online on my host server, so this can't be the problem? line 16 on http://www.thevillagers.co.uk/fpss/fpss.php relates to:-

require_once(dirname(__FILE__).DS.'slideshows'.DS.$slideshow.DS.'param eters.php');

Any help would be great.

Re: Help with PHP and linking to a file

Posted: Thu Nov 04, 2010 4:00 pm
by Jonah Bron
rjtyrell wrote:Warning: require_once(/home/thevilla/public_html/fpss/slideshows/myslideshow/p arameters.php) [function.require-once]: failed to open stream: No such file or directory in /home/thevilla/public_html/fpss/fpss.php on line 16
There's a space in "parameters.php" ("p arameters.php"). That could be the problem.
rjtyrell wrote:Fatal error: require_once() [function.require]: Failed opening required '/home/thevilla/public_html/fpss/slideshows/myslideshow/parameters.ph p' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/thevilla/public_html/fpss/fpss.php on line 16
Another space ("parameters.ph p").
rjtyrell wrote:require_once(dirname(__FILE__).DS.'slideshows'.DS.$slideshow.DS.'param eters.php');
Another space. I'm starting to think these are just typos in your post?

When posting code on the forums, always use the

Code: Select all

[/syntax ] tags (the [i]PHP Code[/i] button).  Please edit your original post.

Re: Help with PHP and linking to a file

Posted: Thu Nov 04, 2010 4:04 pm
by requinix
http://www.thevillagers.co.uk/fpss/slideshows/

You don't have a "myslideshow" slideshow. Only one there is "demo".
Jonah Bron wrote:Another space. I'm starting to think these are just typos in your post?
Yeah, I saw them too and thought that too. The page itself shows the errors without the spaces in the filenames.

Re: Help with PHP and linking to a file

Posted: Thu Nov 04, 2010 4:07 pm
by rjtyrell
many thanks for your quick replies, i will check the typos and change to demo.

thanks again