PHP copy() and file() functions
| From: | Robert J Sherman | Date: | Wed, 12 Jul 2000 15:32:34 +0000 |
| Subject: | PHP copy() and file() functions | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-1048@lists.php.net to get a copy of this message | ||
I've written two different scripts, both which perform various file and copy functions
and I've found a funny problem and inconsistent situation with these functions.
1st, I wrote a counter script, which works perfectly on both Un*x and Win32
it is able to read and write to the file on both platforms, and here's an example
of the write/read paths as fed to the function(s)...
c:/httpd/htdocs/mydom/counter/count.txt (win32)
/usr/home/mydomain.com/html/counter (un*x)
Now, this other program is performing a copy from a "file" input field, and perhaps
that's really why the problem.
on win32 using a path like the above DOES NOT WORK, instead I have to use a
path like:
c:\\httpd\\htdocs\\mydom\\uploaddir\\
followed by a "stripslashes()" function in the actual program code.
oh unix my path is just like above, but I have
to go into the program code and remove the "stripslashes()"
This ultimately means, that if I were to say want to make this program a
public released copy, I would have to do like many perl programs are done
and create a Un*x and Win32 versions....
THIS IS COMPLETELY undesirable!
Now, here's the error I get on win32 when the stripslashes() is not in
the code, and the path is like "either" of the above examples:
ERROR Could Not find C:\\WINDOWS\\TEMP\\php3.
The first error I got was ERRR could not find C:\\WINDOWS\TEMP\php2
so I just added a php2 subdirectory to my windows\temp folder.. that
of course made PHP change it's error to looking for a php3 directory.
So, what I'm looking for is a way to eliminate the use of the stripslashes function
from the copy() function... allowing this application to easily migrate from
win32 to Un*x
ANY SUGGESTIONS?
Kind Regards
Robert J Sherman
827 W 13th St
Joplin, MO 64804
417.626.7759 ph
877.626.9876 toll free (US and Canada)
webmaster@snr-graphics.com
"Be not so quick to judge. Not everything is, understanding. Not all at once, is it revealed..."
Yoda -- Episode I: The Phantom Menace 1999SnR Graphics http://www.snr-graphics.com/