I'm not sure of your environment, but this error message appears when you mistake the controller's path or name.
You changed or added theSingleController.php
into your controller’s path, right? That isn't on the tutorial.
You should check that your Bootstrap file has access to the controller’s path (orSingleController.php
).
I just did the basic tutorial with php 7.4.6 - but with apache webserver:
My Question to you: Did you start your page with http://localhost/ ? so there should not be any "SingleController"-Error to be run into :-/
At the basic tutorial phalcon does not do that much - just putting all steps together for displaying your hello world from your IndexController.php (in app/controllers/ ) because you don't work with models nor views nor templates at all.
if you use apache as well, take care that your DocumentRoot is "[WebProjectDir]/public/" -> if you have apache standard install it could be: "C:\apache\htdocs\public" (Windows Style) and in Apache use unix-style ;)
That could be a bit tricky at the beginning :)
Okay, maybe the Documentation can be corrected at some steps - for example the integration of PHPStorm is quite easyer than shown in video. maybe I'll correct that at some time :)
And now have fun with Phalcon, come back on any questions :)
the issue because the project is not on root folder
the best solution to this issue is reverse every change you made before ( judging by reading some of the comments ) which suggests editinghttpd.conf
which is not recommended mostly because it is the same as moving the contents of foldersingle
tohtdocs/
and this will get your server stuck on one project
now the simple solution:
editsingle/public/index.php
change$_SERVER['REQUEST_URI']
to$_GET['_url'] ?? '/'
like so:
echo $application->handle($_GET['_url'] ?? '/')->getContent();
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Find the answer in similar questions on our website.
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.
PHP (from the English Hypertext Preprocessor - hypertext preprocessor) is a scripting programming language for developing web applications. Supported by most hosting providers, it is one of the most popular tools for creating dynamic websites.
The PHP scripting language has gained wide popularity due to its processing speed, simplicity, cross-platform, functionality and distribution of source codes under its own license.
https://www.php.net/
Phalcon is a special PHP framework, the source code of which is written in C. It may seem strange, but thanks to this approach, this framework can be called the fastest project of its kind. Working with this framework does not mean you need to have C development experience. A programmer choosing Phalcon can only deal with PHP classes and namespaces generated by the framework.
https://phalcon.io/en-us
Bootstrap is not exclusively a CSS framework, but its most popular features are CSS-centric. These include a powerful grid, icons, buttons, map components, navigation bars, and more.
https://getbootstrap.com/
Welcome to the Q&A site for web developers. Here you can ask a question about the problem you are facing and get answers from other experts. We have created a user-friendly interface so that you can quickly and free of charge ask a question about a web programming problem. We also invite other experts to join our community and help other members who ask questions. In addition, you can use our search for questions with a solution.
Ask about the real problem you are facing. Describe in detail what you are doing and what you want to achieve.
Our goal is to create a strong community in which everyone will support each other. If you find a question and know the answer to it, help others with your knowledge.