I have a website that it is fully done but I need to view it on my local host b/c I would like to update a few things on the frontend. So I have installed yii2 and xamp on my computer and I can view the basic template on my local host( a username was made in the phpmyadmin and that username was used to replace the "filler" text that was in the main-local.php file).
So I thought of extracting the website that I have into to yii2 folder that I am able to view, letting it override the duplicated files and folders, and then possibly being able to view the site that was done for me that way. But when I open any of the files on my local I get an error. One being for example:
Here are the codes, I have pointed out the referring lines in the error message:
main.php
'class' => 'creocoder\flysystem\WebDAVFilesystem',
// 'proxy' => 'your-proxy',
authType' => \Sabre\DAV\Client::AUTH_BASIC, <======= this is line 14
'encoding' => \Sabre\DAV\Client::ENCODING_IDENTITY,
'prefix' => '/remote.php/webdav/',
index.php
$config = yii\helpers\ArrayHelper::merge(
require(__DIR__ . '/../../common/config/main.php'), <======= this is line 11
require(__DIR__ . '/../../common/config/main-local.php'),
require(__DIR__ . '/../config/main.php'),
require(__DIR__ . '/../config/main-local.php')
);
(new yii\web\Application($config))->run();
could anyone please help me out with this? I simply to have access to the original person that made this for me. I don’t know if this helps but I have know how to code in bootstrap, html, and css but I am just now learning PHP and java.
Every Yii 2 project is fully self-contained, so you can’t do what you’re doing.
The easiest way to view your project locally is simply to run a local dev server by opening a shell in the web directory of your project and issuing the command
../yii serve
Or, if getting server errors (because a web server is already on port 8080):
So I ran both of the codes that you had posted in the root directory that the website is located in and they both responded the same error:
PHP Fatal error: Uncaught Error: Class 'Sabre\DAV\Client' not found in C:\xampp\htdocs\advanced\common\config\main.php:14
Stack trace:
#0 C:\xampp\htdocs\advanced\yii(20): require()
#1 {main}
thrown in C:\xampp\htdocs\advanced\common\config\main.php on line 14
Fatal error: Uncaught Error: Class 'Sabre\DAV\Client' not found in C:\xampp\htdocs\advanced\common\config\main.php:14
Stack trace:
#0 C:\xampp\htdocs\advanced\yii(20): require()
#1 {main}
thrown in C:\xampp\htdocs\advanced\common\config\main.php on line 14
idk what is wrong could you possibly guide me toward the right direction? In the mean time I am goinng to continue reading up on yii