in reply to print result in text/html file-perl cgi
If that's not true, then that's you're problem. But if it is true, then the problem is probably due to permission settings on the directory (and on the file "test.html", if it happens to exist already when you "execute through the browser"): you probably own the directory (and the file), but the web server that executes your script "through the browser" is not a process owned by you, and that process owner would need to be granted write-access to the directory (and to the file, if it already exists).
Bear in mind that there are risks involved when granting such permissions to processes that run via a web server. Assuming that your system is managed by one or more qualified sysadmins, they would (and should) have something to say about the code you are running on your web server, when this sort of access is involved. (For example, they might advise that the writing of data files by the server be restricted to a specific path that isn't in your own home directory.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: print result in text/html file-perl cgi
by myfrndjk (Sexton) on Jul 31, 2014 at 00:40 UTC |