FuelPHP Interview Questions and Answers

经过Mohammed, on May 18, 2018 5:04:20 PM

FuelPHP Interview Questions and Answers

Q1. What is FuelPHP?

Ans:FuelPHP is PHP Framework written in PHP based on the HMVC pattern.FuelPHP is a simple, flexible, community driven PHP 5.3 web framework based on the best ideas of other frameworks with a fresh start

Q2。FulEPHP需要什么最小PHP版本?

Ans:PHP 5.4+

Q3. What are the features of FuelPHPFramework?

Ans:FuelPHPFramework features are:

  • URL路由系统
  • Restful implementation
  • HMVC实施
  • 形式数据验证
  • ORM (Object Relational Mapper)
  • Vulnerability protections like XSS, CSRF, SQL Protection and encode output.
  • 缓存系统

Q4。安装FuelphpFramework的最低要求是什么?

Ans:There are the following minimum requirements for installing FuelPHPFuelPHP Framework:

  • PHP Version >= 5.3.3
  • Mbstringphp extension installed and enabled
  • MCRYPTPHP扩展已安装并启用
  • FileInfophP扩展已安装并启用
  • PHPUnit version 3.7 or greater is required if we want to run unit tests.

Q5. What Are Benefits Of Hmvc?

Ans:

  • 模块化
  • Organization
  • 可重复使用
  • 可扩展性

Q6. List Reserved Routes In Fuelphp.

Ans:In Fuel, there are 4 reserved routes. They are _root_, _403_, _404_ and _500_.

  • _Root_ - 未指定URI时的默认路由。
  • _403_ - 应用程序抛出未捕获的httpnoaccessexception时使用的路由。
  • _404_ – The route used when the application throws an HttpNotFoundException that isn’t caught.
  • _500_ - 应用程序抛出未捕获的httpservererrorexception时使用的路由。

Q7。我们如何快速安装FuelPHP框架?

Ans:We can quick install FuelPHP Framework by using some command:
Quick installation using Oil from the web.
$ curl https://get.fuelphp.com/oil | sh

Now that oil is installed, create a blog project in a directory called Sites.

  1. $ CD网站/
  2. $ oil创建博客

Q8. What is the controller in FuelPhp framework?

Ans:Controller is a class that contains action methods. It is used to manage HTTP client request and respond back.
所有控制器都存储在燃料/应用程序/类/控制器/directory.

Example:

ClassController_employee扩展了控制器{
public function action_home() {
echo "FuelPHP-Employee application!";
}

公共功能action_index(){
echo "This is the index method of employee controller";
}
}

There are two methods in the controller.

  1. before()动作方法
  2. 后()动作方法.

Q9. What is the use of Oil Package in FuelPHPFramework?

Ans:In FuelPHP, Oil package is used for installation, development and testing of application.

Q10。什么是演示者以及如何在FuelPHP框架中创建主持人?

Ans:主持人是包含逻辑的类。需要产生我们的观点。主持人不应执行任何数据操作,但可以包含数据库调用或任何其他检索。
创建空的主持人:
classPresenter_Index扩展主持人
{
--- Body --
}

Q11. How can we get query in FuelPHP Framework?

Ans:In FuelPHP, we can get query by using following steps:
$ userQueryToExecute = model_article :: query()
->select('users')
- >在哪里('blocked','=', 1);
echo
$userQueryToExecute ->get_query();

Q12。如何检查Redis服务器正在运行?

Ans:尝试{$ redis = \ redis :: instance();} catch(\ redisexception $ e){//此处错误将出现}

Q13. What Are Inbuilt Security Features Comes With Fuelphp?

Ans:Fuel takes security very seriously, and as a result, has implemented the following measures to ensure the safety of your web applications:

  • Output encoding
  • CSRF保护
  • XSS filtering
  • 输入过滤
  • SQL injection

Q14。FUELPHP中的会话方法是什么?

Ans:In FuelPHP Session methods are given below table:

Session Methods Description
放() 它用于分配会话变量。
得到() 它用于分配会话变量。
删除() It is used to retrieve the stored variable from the sessions.
create() It is used to create a new session.
destroy() It is used to destroy an existing session.

Q15. Is FuelPHP support Multilingual?

Ans:Yes, FuelPHP supports Multilingual.

相关的访谈问题...

话题: FuelPHP Interview Questions FuelPHP Interview Questions and Answers Information Technologies (IT)

评论

订阅

Top Courses in Python

Top Courses in Python

We help you to choose the right Python career Path at myTectra. Here are the top courses in Python one can select.了解更多→

aathirai切芒果泡菜

    More...
    Baidu