Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Data Model Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

How to get the response of data

Go to End



Community Member, 1 Post

17 March 2011 at 9:00am

hy i have created Property.php,Media.php file in the mysite/code folder now i wants to access the of Property class than how should ido?

i am trying it by http://localhost/ss/Property/ReadFile . but it redirects me to 404 error found page. what should i do?

here is the sample code

Class Property extends Page{
static $db = array(

'PROP_SUB_ID'=>"Int", //comes from property subject table


class Property_Controller extends Page_Controller {
//public $blm_file_content="";
function ReadFile($filename){
$media_image_path="path to upload folder";
$filepath="file path";
$tmpDir = dir($filepath);
$tmpDir->handle ;
while (false !== ($name = $tmpDir->read())) {
$path_parts = pathinfo($filepath.$name);
echo "Here ";


please help me.
sorry for my bad english