Jump to content

Kosta2014

New Members
  • Posts

    3
  • Joined

  • Last visited

Kosta2014's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Perfect. It worked. Thank you so much!
  2. What I mean is this: If I have this line in HTML file: <img src="/Images/headerback.jpg" width="2" height="50" alt=""/> server understand that /Images/headerback.jpg starts from /var/www If I have this line in PHP file: <?php include('/Includes/header.php'); ?> PHP does not understands that it should start from /var/www. Instead this will work only if the file is in root directory, assuming that "Includes" are just under root directory: <?php include('Includes/header.php'); ?> Can I change settings of PHP so that it understands that root directory is always /var/www
  3. I have PHP installed on my Ubuntu server with Apache 2. Document root for Apache is set in apache2.conf to be /var/www which is the standard. This is a dedicated server and no virtual servers are installed. HTML files recognize Document Root and wherever I put a file, it will know that /some/directory/file is starting from /var/www. This is not the case with PHP. I always have to provide exact path starting from the directory where the actual file is located. This works, but then I cannot really have good include files because the parsed root address will be different every time depending on the location of the file. I have found locations of php.ini files and also apache configuration files. Since I am very much a beginner in setting up server, php and apache, I need some very basic help here. Thanks a lot guys.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.