Jump to content


Photo

Dumb question about previous directory in php


  • Please log in to reply
2 replies to this topic

#1 Joskevic

Joskevic
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 21 July 2006 - 10:40 AM

Hi

I want to include a file that's in a higher directory, but I don't know how to link to that higher directory. In html its just ../somefile.inc, but in php it's different I think. Can someone help me please?

Thanx a lot

#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 21 July 2006 - 10:54 AM

Its the same with php:
include '../dir_name/filename.php';

../ = up one higher directory
./  = use the current working directory

#3 Joskevic

Joskevic
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 21 July 2006 - 11:17 AM

meanwhile I found out, stupid mistake from me




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users