RE: [PHP-WIN] writing to a file on PWS with PHP4 on Win98SE
| From: | Ignatius Teo | Date: | Mon, 07 Aug 2000 01:48:08 +0000 |
| Subject: | RE: [PHP-WIN] writing to a file on PWS with PHP4 on Win98SE | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-1596@lists.php.net to get a copy of this message | ||
Hi,
Try passing fopen a physical device path rather that a url:
eg. fopen("c:/temp/mydata.txt");
or if you're using *nix:
fopen("/etc/mydata.txt");
Ignatius
> -----Original Message-----
> From: mcni7e [mailto:mcnite@get2net.dk]
> Sent: Saturday, 5 August 2000 04:40
> To: php-windows@lists.php.net
> Subject: [PHP-WIN] writing to a file on PWS with PHP4 on Win98SE
>
>
> huh
>
> i finally got PHP4 working on windows 98 and now want to make
> a guestbook
> but i can't use MySQL as db for it ...
> cause i can't find propper install package or it does not
> exist for windows
> 9.x, i have know idea what problem is!
>
> but i desided to use flat-file for storing my data into, neat rite?
>
> well ...
>
> it is not that neat after all cause PWS does not support FTP
> service under
> windows 98 and i can't seem to write to file i want to write
> through http
> protocol.
> here is my method i was trying to use (file i want to write
> to is named
> 'test.dat')
>
> <?php
> $file = fopen("http://mcnite/stolac/test.dat",
> "w");
> if (!$file) {
> echo "<p>Unable to open remote file for writing.\n";
> exit;
> }
> /* Write the data here. */
> fputs($file, "$HTTP_USER_AGENT\n");
> fclose($file);
> ?>
> *this script i found as example in PHP manual*
>
> i report no error but nothing happens
>
> any other way i can write to file a file with PHP4 running on
> Win98SE / PWS?
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
> For additional commands, e-mail: php-windows-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>