I am trying to collaborate Nginx and Yii. I have set nginx root directory as the yii webapp as - yiic webapp /usr/share/nginx/app
In this directory I have some number of default files like yii's index.php, index-test.php along with the essential folders like protected, themes, css and images. Also I have my own files; phpinfo.php to print phpinfo() and getAttribute.php to print some columns from the mysql table history. I am able to display the phpinfo when I hit http://localhost/phpinfo.php but I can't show the output of getAttribute.php-
#getAttribute.php
<?php
public function attributeLabels() {
return array(
Yii::t('app','model.history.sfExternalfield')=>array(
'External Field'=>Yii::t('app','model.history.sfExternalfield'),
'Delivery Status'=>Yii::t('app','model.history.deliveryStatus'),
)
);
}
?>
<html>
<body><?php
print_r(attributeLabels());
?></body>
</html>
<?php ?>
Is there something wrong with this code?
publicmodifier here without having the function within a class. Second, tell me where is this file? in the root folder, along with index.php etc, or within a subfolder?publicand check it out. And yes, this file is in therootfolder, along with the index.php and other default files.public. The page loads in the browser but it is blank.