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.
Help with PHP and linking to a file
Moderator: General Moderators
- Jonah Bron
- DevNet Master
- Posts: 2764
- Joined: Thu Mar 15, 2007 6:28 pm
- Location: Redding, California
Re: Help with PHP and linking to a file
There's a space in "parameters.php" ("p arameters.php"). That could be the problem.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
Another space ("parameters.ph p").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. I'm starting to think these are just typos in your post?rjtyrell wrote:require_once(dirname(__FILE__).DS.'slideshows'.DS.$slideshow.DS.'param eters.php');
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
http://www.thevillagers.co.uk/fpss/slideshows/
You don't have a "myslideshow" slideshow. Only one there is "demo".
You don't have a "myslideshow" slideshow. Only one there is "demo".
Yeah, I saw them too and thought that too. The page itself shows the errors without the spaces in the filenames.Jonah Bron wrote:Another space. I'm starting to think these are just typos in your post?
Re: Help with PHP and linking to a file
many thanks for your quick replies, i will check the typos and change to demo.
thanks again
thanks again