Jump to content

File not found on website


Ysengrim
 Share

Recommended Posts

If I run my program on my computer it works

If I run it on my website it doesn't

The script is using the command "FileExists" for looking for a data-file in the same directory

on my computer the command works

on the website he's giving an error he can't find file

I uploaded both in same directory - like it was on my harddisk

command used : FileExists("data.txt")

Link to comment
Share on other sites

  • Developers

If I run my program on my computer it works

If I run it on my website it doesn't

The script is using the command "FileExists" for looking for a data-file in the same directory

on my computer the command works

on the website he's giving an error he can't find file

I uploaded both in same directory - like it was on my harddisk

command used : FileExists("data.txt")

I bet the workdir is not equal to the scriptdir when running in your website.

Try FileExists(@scriptdir & "\data.txt")

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

I bet the workdir is not equal to the scriptdir when running in your website.

Try FileExists(@scriptdir & "\data.txt")

Jos

Thanks Jos !!!

It didn't work either

but I got to work with the @scriptdir you mentioned and after reading the helpfiles about it I made 2 messageboxen containing the

@scriptdir and the @workdir

use them on my computer harddisk they gave the results I expected

but after putting them on my website and they gave an unexpected result :

working dir = C:\Documents and Settings\MYNAME

script dir = C:\Documents and Settings\MYNAME\Local Settings\Temporary Internet Files\Contents IE5 ........

can somebody explain that or give me a better way to find a txt file to read from for my script? (in the same directory of the script)

thanks a lot

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...