Suchy Posted June 5, 2007 Share Posted June 5, 2007 I have a simple variable: $fulldir = 'photo_upload'; but when I moved the script that this variable is in, the adress should be $fulldir = '../photo_upload'; But this is giving me a error, what would be the correct way of specifing the directory ? Quote Link to comment https://forums.phpfreaks.com/topic/54221-folders/ Share on other sites More sharing options...
zq29 Posted June 5, 2007 Share Posted June 5, 2007 Where is the directory in relation to the script? Quote Link to comment https://forums.phpfreaks.com/topic/54221-folders/#findComment-268269 Share on other sites More sharing options...
saf Posted June 5, 2007 Share Posted June 5, 2007 Well this seems to work fine for me. Try using: $fulldir = './../photo_upload'; You might also want to specify your forwardslash (/) at the end of the variable, just so that you dont have to worry about it later in the code. Quote Link to comment https://forums.phpfreaks.com/topic/54221-folders/#findComment-268360 Share on other sites More sharing options...
Suchy Posted June 5, 2007 Author Share Posted June 5, 2007 in my directory I have something like this: - index.php (webpage) - login.php (webpage) - photos.php (webpage) - photo_upload (folder) -1.jpg , 2.jpg , 3.jpg , 4.jpg... - functions (folder) - show.php , db_connect.php ... I have these variables in the script show.php in that folder "functions" and I want the $fulldir to point to the photo_upload folder Quote Link to comment https://forums.phpfreaks.com/topic/54221-folders/#findComment-268366 Share on other sites More sharing options...
saf Posted June 5, 2007 Share Posted June 5, 2007 if you call show.php explicitly through the browser then your $fulldir has to be '../photo_upload', but if show.php is an include in index.php, login.php and/or photos.php, then your $full dir has to be 'photo_upload' Quote Link to comment https://forums.phpfreaks.com/topic/54221-folders/#findComment-268397 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.