Hello,
I am loading a php file dynamically (with jquery load function).
Is there a way to use "Yii:: params" inside the php file that I loaded?
Thank you!
Hello,
I am loading a php file dynamically (with jquery load function).
Is there a way to use "Yii:: params" inside the php file that I loaded?
Thank you!
Quote
Is there a way to use "Yii:: params" inside the php file that I loaded?
Hi,
I dont exactly know what you mean by "Yii:: params", but you would have all yii functionality available, if you send your ajax-request to a controller action.
For example:
the ajax request
$.ajax({ type: 'GET', url: 'index.php', data: 'r=site/coreversion', dataType: 'text', success: function(data){ alert(data); } });
the corresponding action in your sitecontroller
public function actionCoreVersion() { if(Yii::app()->request->isAjaxRequest) echo "Core Version: ".Yii::getVersion(); }
hope, that helps you.
greets ironic
Thank you for your message. I will have a look on that