|
Post by fsilvestre on Sept 22, 2012 19:35:36 GMT -5
Hey guys,
I'm trying to use my inc_footer in the root directory, but I can't get it to show when uploaded to the paradox server.
<? include_once "/~ug47/1059/inc_header.inc"; ?>
Any idea why it's not displaying this? I think the directories are wrong but I can't figure out how to error check it. If someone could point me in the direction with both that would be cool EDIT: Figured out how to go back a directory
If anyone's interested : <? include_once "../whatever.php"; ?> Go back a directory
to check path: <? $path = $_SERVER['DOCUMENT_ROOT']; echo "your directory is $path" ?>
|
|
|
Post by Bob P on Sept 23, 2012 0:08:48 GMT -5
I'm a bit confused by what you mean with the directory doesn't "show". Anyway, you can use any FTP program (Winscp, Filezilla) to view your root directory and see what your directory structure looks like and also view your associated permissions.
All directories start with root and other directories are at a sibling or child level. To reference the current directory use a period . To move up a directory use .. To move to a sibling simply reference the name of the directory ./siblingdirectory/myfile.php
Bob
|
|
|
Post by Bob P on Sept 23, 2012 0:56:34 GMT -5
I got your code to work but not with your path. Try an absolute path not an abbreviated ~ug47. In your ftp program there should be a full path above your remote window. Look for /home....
Also, I think Mark has $_SERVER array blocked.
Bob
|
|
|
Post by fsilvestre on Sept 23, 2012 9:12:25 GMT -5
Originally, I was confusing myself making this more complicated than it really was I was trying to access the header.inc in a different directory, so I thought if I could get to the root it would work. But the "../" worked for what I needed.
|
|