[pmwiki-devel] [pmwiki-users] Newsletter throttling
Crisses
crisses at kinhost.org
Fri Nov 3 16:00:35 CST 2006
On Nov 3, 2006, at 4:11 PM, The Editor wrote:
> On 11/3/06, Crisses <crisses at kinhost.org> wrote:
>>> fwrite($newspage,"Hello World");
>>> fclose($newspage);
>>> die();
>>
>> You can read an HTML page, but you can't write to an HTML page --
>> write to a file on the system:
>> $newspage = fopen("/path/to/website/zap/news/test.txt", "wb");
>
> This is the path from where?
The computer.
You don't write a file through Apache. You write a file on the
computer's hard drive.
/ is the root of the hard drive in this case -- not the web server files
> From my root web directory? On apache,
> would it be from htdocs for example? That is if zap is a top level
> directory in htdocs it would just be "/zap/news...".
/path/to/your/web/directory/zap/news....
>> That might work....
>
> Thanks for trying. I'm probably going to have to go with cron if I
> can't get this to work but I tried. : )
>
> Do you think it would work to put a simple call to send news in a
> hidden frame?
I think it will work when you are telling the file system where to
save your file. :)
on a windows machine I'm not sure, but it would probably look
something like c:/path/to/web/zap/news
on linux it's usually
/users/username/www-data/
or
/var/www/
on mac it's usually
/Users/username/Sites/
or
/Library/WebServer/Documents/
it's called your "absolute path" to the web directory on the server.
Anything it has to do with http://domain.com/ is because Apache was
told to map the URL domain.com to the system directory /path/to/the/
web/directory on the server. You're saving a file directly on the
system. You're going around Apache.
if you try fopen("test.txt","wb"); it should end up in the same file
as the script that's running.
Crisses
More information about the pmwiki-devel
mailing list