Zend Framework Forum

Go Back   Zend Framework Forum > Zend Framework Forum > General Talks

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-17-2008, 04:55 AM
Junior Member
 
Join Date: Nov 2008
Location: Canada
Posts: 7
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: 11
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 Search this Thread
Search this Thread:

Advanced Search
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

BB 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:53 AM.


Designed by: Miner Skinz Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0