Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End PHP Include issue

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #38002
    dylanpine
    Member

    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






    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.

    #102599
    TheDoc
    Member

    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')
    #102611
    dylanpine
    Member

    @Schmotty @TheDoc

    Still no dice. PHP is up to date (5.3.10). Not sure what’s going on here…

    #102609
    TheDoc
    Member

    If it’s not showing up with that code, then it must be a path issue.

    #102614
    dylanpine
    Member

    @TheDoc It’s in the same directory as page.php. Is that the correct code? Sorry, my PHP is very rusty.

    #102616
    dylanpine
    Member

    That worked. Thank you both!

    #102631
    dylanpine
    Member

    @traq Good to know. Always helps to understand why something doesn’t work. I will definitely check the rest of the site. Thanks!

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘Back End’ is closed to new topics and replies.