path

PHP parse_ini_file() - where does it look?

if I call php's parse_ini_file("foo.ini"), in what paths does it look for foo.ini ? the include path? the function's documentation doesn't mention it. ...

Can I get the path of the php file originally called within an included file?

Let's say we have index.php and it is stored in '/home/user/public/www' and index.php calls the class Foo->bar() from the file 'inc/app/Foo.class.php'. I'd like the bar function in the Foo class to get a hold of the path '/home/user/public/www' in this instance - and I don't want to use a global variable, pass a variable etc. ...

How to remove illegal characters from path and filenames?

I need a robust and simple way to remove illegal path and file characters from a simple string. I've used the below code but it doesn't seem to do anything, what am I missing? using System; using System.IO; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { string illeg...

unix path searching C function

Hi, I am programming a UNIX shell and I have to use the execv() system call to create a process. One of the parameters for execv() is the filepath for the executable. So if somebody types in /bin/ls, it will run the ls executable. But what I need is a function that when ls is typed, it will search for the filepath of ls (like the "whi...

Problem with relative paths C#

I got following problem my app open file in subdirectory of directory where it is executed, subdirectory is called sample and it contains files example.raf (example extension, non signigficant) background.gif example.raf contains relative path to background.gif (in this case only file name cause the files is in same directory as raf)...

relative paths in visual studio

I'm working in Visual Studio 2005 and have added a text file that needs to be parsed by right-clicking the project in the solution explorer and add --> new item. This places the .txt file to the project folder. The debug .exe file is in the /bin/debug folder. My main question is how to properly point to the txt file from code using rel...

Physical path of usercontrol (asp.net)

I have a problem regarding getting the path of a user control. The scenario is as follows: In a aspx i have multiple user controls. In one of those user conrtols i need to loop through the other user controls and get the physical path of them. Is there any easy way to do this? ...

Absolute path & Relative Path

What's the difference between absolute path & relative path when using any web server or tomcat? ...

Os.path : can you explain this behavior ?

I love Python because it comes batteries included, and I use built-in functions, a lot, to do the dirty job for me. I have always been using happily the os.path module to deal with file path but recently I ended up with unexpected results on Python 2.5 under Ubuntu linux, while dealing with string that represent windows file paths : fi...

Where can I find my .emacs file for Emacs running on Windows?

I tried looking for the .emacs file for my Windows install for Emacs but could not find it. Does it have the same filename under Windows as in Unix? Do I have to create it myself? If so, under what specific directory does it go? ...

How to construct a relative path in Java from two absolute paths (or URLs)?

Given two absolue paths, e.g. /var/data/stuff/xyz.dat /var/data How can one create a relative path that uses the second path as its base? In the example above, the result should be: ./stuff/xyz.dat ...

Unix: Getting Export PATH to "Stick"

When setting the export path in Unix, example: export PATH=$PATH: $EC2_HOME/bin If I quit terminal and open it back up to continue working, I have to go through all the steps again, setting up the paths each time. I'm wondering how I can set the path and have it "stick" so my system knows where to find everything the next time I open ...

fatal error C1083: Cannot open include file: 'Windows.h': and scons

Hi, today is officially my first day with C++ :P I've downloaded Visual C++ 2005 express edition and Microsoft Platform SDK for Windows Server 2003 SP1 because I want to put my hands on open source Enso ( http : // code.google.com/p/enso ) . So, after installing scons I went to the console and try to compile it using scons but I go...

ASP.net MVC and jQueryUI dilemma

I just moved a project to the the beta release of ASP.net MVC framework and the only problem I am having is with jQuery and jQueryUI. Here's the deal: In Site.Master are the following script references: <script src="../../Scripts/jquery-1.2.6.js" type="text/javascript"></script> <script src="../../Scripts/jquery-ui.js" type="text/javas...

Get the application's path

I've recently searched how I could get the application's directory in Java. I've finally found the answer but I've needed surprisingly long because searching for such a generic term isn't easy. I think it would be a good idea to compile a list of how to achieve this in multiple languages. Feel free to up/downvote if you (don't) like the...

Getting absolute path of a file

How can I convert a relative path to an absolute path in C on Unix? Is there a convenient system function for this? On Windows there is a GetFullPathName function that does the job, but I didn't find something similar on Unix... ...

How to set the Turbo C path in windows?

hi friends, I am Manoj again here to ask my doubts How to set the turbo c path in windows globally? so that i can compile and run my c progrmas which are in other drives any where in the command prompt in windows XP. Can any one tell me how to get commands at evry drive in the command prompt just by typing in "c:\tcc" in command prompt i...

What are the Conventional GEM PATHS for Ruby under OS X 10.5?

I have a performance problem with my ruby on my machine, which I think I have isolated to loading libraries (when #require is called), so I'm trying to work out whether ruby is searching too many folders for libraries. When I run $ gem environment RubyGems Environment: - RUBYGEMS VERSION: 1.3.0 - RUBY VERSION: 1.8.6 (2008-03-03 pa...

VBA how to check for LAN environment and Cancel check

I am updating a VBA program (excel). At startup the program checks if it can find a directory which is on the office fileserver using: FileSystemObject.FolderExists("\\servername\path") If this is not found the program switches to offline mode and saves its output to the local hard disk (for later transfer), instead of directly to the...

How to make Java execute jars from the current directory in Gnome?

On Ubuntu Linux with Gnome, running my Swing application by double clicking on the jar file in Gnomes file browser leads to errors because required libraries that are dynamically loaded via the Java Plugin Framework (residing in subdirectories) are not found. The base libraries for the framework itself are resolved correctly, as stated ...