- This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
Viewing 7 posts - 1 through 7 (of 7 total)
- The forum ‘Back End’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Here’s my issue – a friend’s hosting expired and I offered to host it – on moving it to my server, nothing worked (see http://nordconsultants.com). After looking at the code, I found the issue.
home
about us
why choose us
services
workshops
success stories
articles
clients
testimonials
contact
ini_set('display_errors','0'); include("/usr/local/etc/httpd/htdocs/nordconsultants/copy-$id.txt"); ?>
When you click on a menu item, say “about us”, it is supposed to load copy-about.txt. Unfortunately, my server is set up differently and
/usr/local/etc/httpd/htdocs/nordconsultants/copy-$id.txt
is not a valid path. The .txt files are in the same directory as the PHP file.
I tried:
copy-$id.txt
/copy-$id.txt
.copy-$id.txt
/domains/nordconsultants.com/html/copy-$id.txt
and nothing worked. I’m guessing I am just missing something stupid, but I am out of ideas. Anyone? Thanks in advance.
My PHP isn’t that strong lately, but I know in JS you’d have to pass in a variable like this:
something('/this/is/my/path/copy-' + $id + '.txt')
If it’s not showing up with that code, then it must be a path issue.
@TheDoc It’s in the same directory as page.php. Is that the correct code? Sorry, my PHP is very rusty.
That worked. Thank you both!