The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.
this works...
but this doesnt...
The error Im getting is: "Fatal error: Failed opening required '/required.php' (include_path='') in
Is there way around this?
PHP isnt my forte. Didn't realise PHP used the file system directory structure.
> How the hell is PHP supposed to know what your domain is? :)
'cus is suppose to be cleaver :oP
Anyway, say your Freeola ID is sr0123456, then your freeola web space root is /freeola/users/%/*/sr0123456/
Its a bit confusing here, but I'll give it a shot.
The '%' value is the last number in your ID, in this case 6.
The '*' value is the second from last number in your ID, in this case 5.
/freeola/users/6/5/sr0123456/ - being the root.
/freeola/users/6/5/sr0123456/htdocs - being your Web Space.
/freeola/users/6/5/sr0123456/cgi-shi - being your cgi-bin.
Confused yet :o)
Explanation:
/foo.php in HTML is / in the domain, eg. www.mysite.com/foo.php
However, PHP runs on the filesystem as a program - /foo.php tries to look in the root directory for foo.php, kinda like C:\foo.php. Here:
+--={05:54:00}=--
| rob@euripides:~$ ls /
abyss c data etc initrd mnt rar tmp vmlinuz xmms
bin cdrom dev floppy lib proc root usr vmlinuz.old
boot d downloads home lost+found pub sbin var www
+--={05:54:01}=--
| rob@euripides:~$
See now? Your scripts will be somewhere in there somewhere, you have to find out what the "path to your root directory" is. In my setup, it's /www, on freeola's it's something massive like /var/apache/users/[your-userid]/htdocs/
How the hell is PHP supposed to know what your domain is? :)
I'm sure there is an easier way of doing that, but its skicped my mind for the moment, but I'll look it up.
Suppose you could try setting up a Variable for the location of the root
$Root = "/home/html/public" or whatever your surver is set up as. Then just use:
but like I say, I'm sure that isn't the only way of doing it.
Rob might be able to answer this, but I'll go and have a look ...
to
would mean its looking in the current directory, whereas I want it to look in the root.
And its a static filename Im using.
It's definately a PHP thing, as HTML works fine when you use this for hrefs etc.
Are you using a variable to put the name there, or a static name?
as in
or
this works...
but this doesnt...
The error Im getting is: "Fatal error: Failed opening required '/required.php' (include_path='') in
Is there way around this?