Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6932449
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:42:27+00:00 2026-05-27T11:42:27+00:00

I am designing my own MVC pattern to ease the process of creating homepages.

  • 0

I am designing my own MVC pattern to ease the process of creating homepages. My templating system needs my controller class to output my views. This means I have to output the file through a php function. I have been searching for some a while now and can’t seem to find a solution.

How can I, through a PHP function, run a string representing some source code (“< ?”, “< ?php”, “? >” and so on) as php? Eval would not take my < ? signs (and I read that function is crap for some reason).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T11:42:27+00:00Added an answer on May 27, 2026 at 11:42 am

    You could execute the php code and collect the output like this:

    ob_start();
    include "template.phtml";
    $out1 = ob_get_clean();
    

    http://www.php.net/manual/de/function.ob-get-contents.php

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating a custom Table by designing my own UITableViewCell in Xcode and
I set about designing my own class to hold a series of radio buttons.
I've added some of my own helpers to the System.Web.Mvc within my project and
Just today I've started using Drupal for a site I'm designing/developing. For my own
I'm defining my own AR class in Rails that will include dynamically created instance
When designing a stock management database system for sales and purchases what would be
I have a class that extends the HtmlHelper in MVC and allows me to
I am designing a multi tenants web portal application using MVC. Tenants will be
I am at the early stages of designing a new MVC SaaS application that
I am new to designing my own database. My project is orders/products/inventory type data,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.