Page 1 of 1

Getting getcwd() to work with my localhost (through Wordpres

Posted: Sun Apr 19, 2009 5:03 am
by ldexterldesign
Hi guys,

Having a bit of trouble here with this function. Has anyone got it to pull a correct path through a localhost (I'm using XAMPP)?

I've had the script working fine on my webserver, although whenever I use the script locally instead of using

Code: Select all

http://localhost[..]
as the prefix it uses my local C:drive:

Code: Select all

C:\xampp\htdocs\wordpress/wp-content/themes/ldexterldesign
.

Any thoughts?

Thanks,
L

PS. Not sure if this is accepted on this forum - it's cross posting, so apologies if so - but I put this up at the Wordpress forum: http://wordpress.org/support/topic/262937?replies=2 It's the scripts I'm referring to in this post.

Re: Getting getcwd() to work with my localhost (through Wordpres

Posted: Sun Apr 19, 2009 8:26 am
by jazz090
you got backslashes and forwardslashes in ur path, just use: "/xampp/hdocs/wordpress/wp-content/themes/etc/ and will work, i got xampp on same directory and that works fine.

Re: Getting getcwd() to work with my localhost (through Wordpres

Posted: Sun Apr 19, 2009 11:50 am
by ldexterldesign
jazz090 wrote:you got backslashes and forwardslashes in ur path, just use: "/xampp/hdocs/wordpress/wp-content/themes/etc/ and will work, i got xampp on same directory and that works fine.
Thanks for the reply. The backslashes are generated by PHP, not me :cry:

I will persevere.

L