Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-17-2008, 04:55 AM
Junior Member
 
Join Date: Nov 2008
Location: Canada
Posts: 4
Default Reading contents of file from Controller action

Hi All,

How do I read the contents of a file into a string from a Controller action

I have tried the following that give me the error No such file

$contents = file_get_contents('verification_email.html');

the file with placed in the same folder as the Controller and it has read access

How should I specify the location of the file OR
what Zend method can I use in the controller to read the file

Help guys, anybody, I am new to Zend Framework


Vernon
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 12-03-2008, 12:42 PM
Junior Member
 
Join Date: Jul 2008
Posts: 4
Default

HI

$file=root path(ie d:\wamp\www\pjtfolder\public\abc.html);

note does not give the path start with http://

$contents = file_get_contents($file);

will solve your problem

by

Ratheesh R
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 08:59 PM.