473,387 Members | 1,597 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

./ on server?

I recently developed a website for my school. I was working off localhost for the development. When time came to upload the server we had didn't accept "./" or "../" as soft paths. Am I doing something wrong? Is there anyway to solve this?

Thanks.
Sep 26 '08 #1
7 1046
If I'm on a windows server do I have to use ".\" instead of "./"? Just a thought...
Sep 26 '08 #2
ak1dnar
1,584 Expert 1GB
Could you please explain "soft paths" ?
Are you talking about relative path? give some example links (Image,File) which is not working in your HTML/PHP codes.
Sep 26 '08 #3
nathj
938 Expert 512MB
If I'm on a windows server do I have to use ".\" instead of "./"? Just a thought...
If you mean relative paths so using '../' to go back up the directory tree and then adding the rest of the path to come down the tree you should be able to use either '/' or '\' for Windows - it sorts it out for you - I think.

If it's *nix box then you need to use '/'.

So I recommend you use '/' as that should work regardless of server OS. To give an example if you have a site 'www.myschool.com' and you want to go to the images directory you could do so with 'image'mypicture.jpg' to get that file.

If you are in a sub directory say 'www.myschool.com/pages/classes.php' and you want to get an image from the image directory, which is at the same level as the pages directory then '../image/classpicture.jpg' should do the trick.

It is definitely a double'.' to go back up the tree though. The simple solution might be to use absolute paths rather than relative ones anyway.

Cheers
nathj
Sep 26 '08 #4
I'm doing "is_dir('./blogs')" and it's returning false.
Sep 26 '08 #5
Markus
6,050 Expert 4TB
I'm doing "is_dir('./blogs')" and it's returning false.
Say you are currently in a file (www/dir1/dir2/dir3/test.php) this file has been included by www/dir1/dir2/startup.php and this has been included by www/dir1/run.php

Using './' in test.php will then refer to www/dir/
'./' takes you to where the 'parent' file is.

Just to clear up any confusion. So make sure there is a directory called 'blogs' whereever your php script starts.
Sep 26 '08 #6
This all works when I run on localhost. Would it be different on the server?
Sep 26 '08 #7
Ok strike that, I've fixed that problem, but now I have another. I can't read or write files on the server. I'm assuming that the permissions just aren't letting me, but I think my server doesn't support chmod. Should I just look for a new server, or is there a way around this?
Sep 27 '08 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Phil | last post by:
I am using a Pascal like language (Wealth-Lab) on W2K and call this server: class HelloWorld: _reg_clsid_ = "{4E797C6A-5969-402F-8101-9C95453CF8F6}" _reg_desc_ = "Python Test COM Server"...
6
by: Nathan Sokalski | last post by:
I want to set up SQL Server on Windows XP Pro so that I can use the database capabilities of ASP and IIS. I am probably using some incorrect settings, but I am not sure what they are. Here is what...
9
by: Grim Reaper | last post by:
My work let me put SQL Server 7.0 Enterprise Edition on my laptop. I have never setup a server from the beginning, so I am a little new at creating server groups. Alright, I am trying to create...
0
by: Chris Halcrow | last post by:
Hi I've spent ALL DAY trying to re-install SQL Server 2000 on Windows XP. I continually get the error 'cannot configure server' just at the end of the installation. I've tried the following: ...
0
by: Zorba.GR | last post by:
IBM DB2 Connect Enterprise Edition v8.2, other IBM DB2 (32 bit, 64 bit) (MULTiOS, Windows, Linux, Solaris), IBM iSoft Commerce Suite Server Enterprise v3.2.01, IBM Tivoli Storage Resource Manager...
2
by: Hazzard | last post by:
I just realized that the code I inherited is using all asp.net server controls (ie. webform controls) and when I try to update textboxes on the client side, I lose the new value of the textbox when...
2
by: Mike | last post by:
Hi, I am strugling with a simple problem which I can't seem to resolve. I have an asp.net page which contains a server-control (flytreeview, which is a kind of a tree to be exact). The tree is...
2
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of...
14
by: Developer | last post by:
Hello All, i have recently installed VS2005 and was trying to install SQL sever 2000. I have Win XP' SP2. But when I tried installing, it only installed client tools and not the database. Can...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.