Hi i am a beginner in php. i have able to successfully run my hello world program with eclipse oxygen and php builtin server.
I want to use agile ui in my current php project. i am putting the agile toolkit folder in my project folder. and when i write this code.
<?php
echo "Hello my first page from php"; // Hello world run perfectly
require 'vendor/autoload.php'; // no error here
$app = new \atk4\ui\App('My First App'); // Error
$app->initLayout('Centered');
$app->add('HelloWorld');
?>
it is giving me error "App cannot be resolved to a type"
can anyone tell what to do because i didn't find a way to make it work?
Related
I have started my first laravel project after I got a recommendation to use a framework.
I have started watching some tutorials and am trying to follow along, but in all the tutorials there is an assets folder inside resources with for example a _variables file. I don't have this folder, I guess it because I am using laravel version 7x and the tutorials are using an older version? I also thought bootstrap was provided with laravel, but it does not work. Have I done anything wrong or does everything seem right? I have followed a tutorial step-by-step from the start and used npm install & npm run dev, but the css file it creates is empty. I have also tried to start over with a new project, but the same happens!
Any help is appreciated!
Are you already run composer require laravel/ui? Laravel 7 has frontend scaffolding. You can read the documentation's about frontend scaffolding here https://laravel.com/docs/7.x/frontend.
Hope this help.
Error picture
I have this code:
<?php
class Test2
{
public function hello()
{
echo "hello";
}
}
$t=new Test2(); //Class 'Test2' not found
echo $t->hello();`
Zend Studio gives me the error
Class 'Test2' not found
But as you can see, class Test2 does exist.
Here is a screenshot of the situation:
Can someone help me solve this problem?
My Zend studio version is 13.61
If I automatically create a new class Test2 according to the error message, I will get another error: this class has been created. Besides, this Test2 is hand-made by me and can't be wrong. In my completely correct project, about 50% of the classes will prompt this error. So I created a new test php file to test the strange problem of recreating. This obvious problem really makes people collapse! I have more than 10 years of php work experience! Thank you very much for your answer.
This program is obviously no problem, it can also run normally in the browser! I think it is the Zend Studio's mistake, and I prefer ZendStudio,so i want to use it's latest version . This issue is only available in the 13.6.1 version. Zend studio 13 does not have this problem. But I want to use the latest version. I just ran it in the browser just now, to make sure that the output hello can be run normally. However, ZendStudio forces it into debug mode and generates a breakpoint on the first line of this file (test.php). I need to continue to execute to get the result: hello. This is another annoying part of ZendStudio. It is also a bug that needs to be solved.
In fact, I have more than 18 years of programming experience. ZendStudo has also been used for a few years. This kind of problem happened for the first time. It is estimated to be a bug in zendstudio. But ZendStudio 13.6.1 seems to have been out for a year now? How could there be such a mistake? Can someone help me?
I will suggest you start Zend Studio in a new Workspace(File | Switch Workspace | Others) and try the code. It shouldn't give any error. Here is the screenshot from my Machine(Zend Studio 13.6.1).
Now, i using vuejs and laravel. when i see view page source (Ctrl+U) but have not html code.I went to find in google.And found need to use Server side rendering
(I learned form https://medium.com/js-dojo/server-side-rendering-with-laravel-vue-js-2-5-6afedd64aa90) But problem is "Class 'V8Js' not found"
Someone can help ?
sorry I don't speak English that well
The problem is, that V8JS is a PHP library, that is not shipped by default and you have to compile it by yourself. You can learn more about it and how to install it on it's GitHub page. Follow the installation instructions for your local machine operating system and you should be good to go. If you would like to deploy your app to your hosting provider, first you have to make sure that your host has this PHP extension compiled and enabled. Hopefully this helps you :)
I'm a webdeveloper and I'm starting a huge project requested by a company.
I'm trying to figure out if is best to use a PHP framework or not, and in case, which one.
I know Codeigniter, but I wanted to look around to see what's the best framework at the moment. I found out Laravel is trending at the top so I wanted to try it out.
Being used to Codeigniter I usually download the zip file with all the phps inside and start working. I'm trying to do the same with Laravel but I saw you are to download and use composer to install it.
I'm not really used to the Terminal and I wanted to ask if that's the only way of installing it or if there is a downloadable version as in Codeigniter, CakePHP, etc...
You can always download the ZIPped code directly from project's GitHub site. You can find the base application here: https://github.com/laravel/laravel - you'll find a link at the bottom of the right column. This code is what composer downloads when you use that to setup the application.
If you want to use Laravel you will have to use Composer as this is what the application uses to manage its dependencies. It's not hard, as you'll only need to run a few commands.
You can learn more about how to install and use composer in the docs: https://getcomposer.org/download/
I have downloaded the latest releases of Joomla (3.0.2) and Ajaxplorer (4.2.3).
I am trying to bridge the two for authentication purposes and have run into a snag. The current auth bridge is for Joomla 1.6... So I went ahead and figured I would give it a shot. The normal way to implement the bridge was just fine except for two things.
The "DS" in the /joomla/plugins/user/ajaxplorer/ajaxplorer.php line 14 needed ' around it...still not sure why but it got rid of the errors so I'm hoping that I'm safe in assuming that it's no longer going to cause a problem.
Originally it looked like this:
require_once ( JPATH_ROOT .DS.'libraries'.DS.'joomla'.DS.'html'.DS.'parameter.php' );
But after getting the errors I changed it to:
require_once ( JPATH_ROOT .'DS'.'libraries'.'DS'.'joomla'.'DS'.'html'.'DS'.'parameter.php' );
All I did was add ' around the DS. Got rid of the errors.
The same file from above is calling for a file called parameter.php that doesn't exist. I have manually looked for the file but didn't find it in that directory or in any other directory. Here is the actual error that I got when trying to login or do anything with authentication.
Fatal error: require_once(): Failed opening required 'C:\xampp\htdocs\joomlaDSlibrariesDSjoomlaDShtmlDSparameter.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\joomla\plugins\user\ajaxplorer\ajaxplorer.php on line 14
Don't worry, this is only a test server, the file path is not the same as the one that would be published.
So the question is: Does anyone know what was in parameter.php or know what joomla used instead of parameter.php that I could point ajaxplorer.php to? I'd appreciate the help!
You actually have to problems:
First, from what I can see you've used DS in Joomla! 3.0
DS has been deprecated in 2.5 and removed in 3.0. Regardless of a sever on *unix or Windows, you can just use /.
So it should look like this (which does not work anyway):
require_once JPATH_ROOT . '/libraries/joomla/html/parameter.php';
Second, JParameter (which was inside parameter.php) has been removed. Suggested replacement is JForm or JRegistry.
I can't tell you how you can fix this, because I haven't worked yet with ajaxplorer. It's just clear that you need to digg a bit inside the plugin to make it work.
Also be aware that Joomla! 3.0 is a short time support release. Soon it will be 3.1 etc.. till 3.5 which will be the LTS.
I would suggest that you have a look at Joomla! 2.5 which is already supported by ajaxplorer.