CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: mod_perl:
File I/O Problem - Help Needed

 



modpluz
New User

Aug 11, 2008, 2:18 AM

Post #1 of 2 (13549 views)
File I/O Problem - Help Needed Can't Post

Good day,
please i have a file input/output problem, while would this code be displaying a blank page.

here is my code;

Code
sysopen (HTML, 'myhtml.html', O_RDWR|O_EXCL|O_CREAT, 0755) or die "$filepath cannot be opened."; 
printf HTML "<html>\n";
printf HTML "<head>\n";
printf HTML "<title>My Home Page</title>";
printf HTML "</head>\n";
printf HTML "<body>\n";
printf HTML "<p align='center'>This is a test paragraph.</p>";
printf HTML "</body>\n";
printf HTML "</html>\n";
close (HTML);



gnix
Novice

Feb 17, 2009, 4:50 PM

Post #2 of 2 (8884 views)
Re: [modpluz] File I/O Problem - Help Needed [In reply to] Can't Post

I tried your code using the Fcntl module and it works correctly. Maybe, you forgot to insert "use Fcntl;" on the top of your script.

gnix

Edit: Is not necessary the eXecution permission for a HTML file.


(This post was edited by gnix on Feb 17, 2009, 4:52 PM)

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives