473,396 Members | 1,996 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,396 software developers and data experts.

upload_dir via http://localhost

Hi,

I'd to upload a file to a folder :

$upload_dir = "MyFolder/";

if (isset($_POST['action'])) {
if (!is_dir("$upload_dir"))
{ die ("The directory doesn't exist"); ....

it's ok when I use it!

Now, my windows XP Sp2 has a web server IIS

$upload_dir = "http://localhost/MyFolder/";

and it gives the error : The directory doesn't exist

"MyFolder/" is always in C:\Inetpub\wwwroot
ie C:\Inetpub\wwwroot\MyFolder

Thank you for showing me how to use
"myFolder" via http://localhost
Jan 15 '08 #1
3 3645
Jimmy wrote:
Hi,

I'd to upload a file to a folder :

$upload_dir = "MyFolder/";

if (isset($_POST['action'])) {
if (!is_dir("$upload_dir"))
{ die ("The directory doesn't exist"); ....

it's ok when I use it!

Now, my windows XP Sp2 has a web server IIS

$upload_dir = "http://localhost/MyFolder/";

and it gives the error : The directory doesn't exist

"MyFolder/" is always in C:\Inetpub\wwwroot
ie C:\Inetpub\wwwroot\MyFolder

Thank you for showing me how to use
"myFolder" via http://localhost
http://localhost/MyFolder/ isn't a (local) directory, it's a URL.

Since you have an invocation that works, why do you want to do something
diferent?
Jan 15 '08 #2

"Paul Lautman" <pa**********@btinternet.comwrote in message
news:5v*************@mid.individual.net...
>>
$upload_dir = "MyFolder/";

if (isset($_POST['action'])) {
if (!is_dir("$upload_dir"))
{ die ("The directory doesn't exist"); ....

it's ok when I use it!

Now, my windows XP Sp2 has a web server IIS

$upload_dir = "http://localhost/MyFolder/";

and it gives the error : The directory doesn't exist

"MyFolder/" is always in C:\Inetpub\wwwroot
ie C:\Inetpub\wwwroot\MyFolder

Thank you for showing me how to use
"myFolder" via http://localhost

http://localhost/MyFolder/ isn't a (local) directory, it's a URL.

Since you have an invocation that works, why do you want to do something
diferent?
Thank you for your help,

then how can I use the URL instead of the folder ?

Any help would be appreciated
Jan 16 '08 #3
Jimmy wrote:
"Paul Lautman" <pa**********@btinternet.comwrote in message
news:5v*************@mid.individual.net...
>>$upload_dir = "MyFolder/";

if (isset($_POST['action'])) {
if (!is_dir("$upload_dir"))
{ die ("The directory doesn't exist"); ....

it's ok when I use it!

Now, my windows XP Sp2 has a web server IIS

$upload_dir = "http://localhost/MyFolder/";

and it gives the error : The directory doesn't exist

"MyFolder/" is always in C:\Inetpub\wwwroot
ie C:\Inetpub\wwwroot\MyFolder

Thank you for showing me how to use
"myFolder" via http://localhost
http://localhost/MyFolder/ isn't a (local) directory, it's a URL.

Since you have an invocation that works, why do you want to do something
diferent?
Thank you for your help,

then how can I use the URL instead of the folder ?

Any help would be appreciated
You can't. Like it's name indicates - is_dir() checks to see if the
parameter is a directory.

And like Paul asked. Why are you changing something that's working?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Jan 16 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: freshinstall4times | last post by:
I'm just trying to get up and running. Just installed (no errors noted) doing http://localhost/quickstart doesn't to work. I just get the "The page cannot be displayed" message. Does this have...
0
by: Gary Holt | last post by:
When I try to create a new VB.Net application on the localhost (Windows 2000 Pro), I am getting the following error: Unable to create or open the Web project located at the following...
0
by: Jiong Feng | last post by:
Hi, I have a ASP.net application, which is in root folder. I hope my http module to intercept requests like: http://localhost/abc/def http://localhost/abc/def/ http://localhost/abc/ where...
0
by: Sunny via .NET 247 | last post by:
i am also experiencing the similar problem.. "The Web server reported the following error when attempting tocreate or open the Web project located at the following...
11
by: Tomas Kepic | last post by:
Hi, i'm trying to create my first ASP.NET project ( HelloASPWorld project) but an error occured when I put OK button in NewProject. ERROR: "The Web server reported the following error when...
0
by: jsausten | last post by:
I am having this ridiculously frustrating problem, migrating an existing web app to VS.2005. Initially I was able to successfully convert my VS 2002 app, by opening the Localhost site using the...
3
by: fniles | last post by:
In our ASP page, we call XMLHttp to download XML files. When calling our page using localhost (localhost/myWebSite/myPage.htm), it works, but when calling using the IP address of the web server...
1
windows_mss
by: windows_mss | last post by:
I Used the above code to Handle the HTTP Error Code, My Problem Is as follows, This My Program URL http://localhost/Work/CustErr/Default.aspx, When I alter The URL Like This...
16
by: Harry Simpson | last post by:
I've been away from ASPNET - I open up a new Web app in VS2008 and go into properties and select to use IIS instead of the personal web server. Then I run in debug mode and it says I have to set...
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: 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...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.