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 8971137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:53:10+00:00 2026-06-15T17:53:10+00:00

i want from url like this: example.com/?module=index&controller=index&action=hello to get the values by $_GET[] and

  • 0

i want from url like this: example.com/?module=index&controller=index&action=hello
to get the values by $_GET[] and then create namespace path like application\modules\index\controllers\IndexController and then

use application\modules\index\controllers\IndexController as IndexController;
$IndexController = new IndexController;
$IndexController->hello();

for example, but when i try to create the path in random ways -> error and .. i don’t know how to do it please help!

  • 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-06-15T17:53:11+00:00Added an answer on June 15, 2026 at 5:53 pm

    As I mentioned in comment: you can’t use variables in use statement, you have to use fully namespaced class name in variable when creating new instance.

    So it would look like this:

    $module = $_GET['module'];
    $ctrl = $_GET['controller'];
    //Remember to use double backslashes in strings
    $class = "application\\modules\\{$module}\\controllers\\{$ctrl}Controller";
    
    $controller = new $class;
    $controller->{$action}();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to get the current page URL from my default_popup page like this:
I want to get the Bitmap from URL like - https://graph.facebook.com/100003506521332/picture I tried how-i-can-display-images-from-url-in-blackberry
I want to get the output of url like http://example.com/mymovieSeatBook.html?booking=0-0 >0-1 but my example
I want to generate jsb3 files from a url like http://example.com/home . Its protected.
I want the url http://welcome.com (for example) to render the content from the url
Suppose I have a url like: http://example.com/get-users which returns a JSON object of all
I want to change the word this in the url in category : http://www.example.com/?cat=USA
I know how to make URL's rewrite, for example: www.example.com/index.php?id=1&cat=3 to www.example.com/1/3/ (or whatever).
I would like to get website name from url for example from http://www.bbc.co.uk/news/ i
I want to fetch some content from a webserver using Net:HTTP, like this: url

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.