How to spot where is variable come from? - yii2

I am building in local then upload in production, but in production I have some variable appear, but I don't know where is come from.
Here is the picture
so "0" will appear if cart is not empty, if cart contain 2 items the "0" will be two.
I thought it come from session but when I check session from yii2 debug there is no session which value is "0";
"0" appear excactly before <!DOCTYPE html>
0</br>0</br>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="Cache-control" content="private,max-age:3600">
it's my view named utama.php here is partial code utama.php
<?php
use yii\helpers\Url;
use backend\modules\company\assets\HomeAsset;
use yii\widgets\Breadcrumbs;
use yii\helpers\Html;
use frontend\assets\FoAsset;
use yii\helpers\VarDumper;
use yii\widgets\ActiveForm;
use yii\base\View;
use common\models\TbCustomer;
use yii\web\JsExpression;
use common\models\TbKategori;
use common\component\BeoHelper;
use common\models\TbSubKategori1;
use common\models\TbSubKategori2;
use common\models\TbMenuPromo;
use yii\authclient\widgets\AuthChoice;
use kartik\typeahead\Typeahead;
use common\models\EAktorType;
use common\models\VwProdukAgent;
$aset = FoAsset::register($this);
?>
//how come "0" can be here?
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="Cache-control" content="private,max-age:3600">
so on....
In case I don't know where is come from or I just forget where is the echo.
Can I spot where is come from and remove it?
If you need more information, please let me know

because it appear before <!DOCTYPE html> so it come from CartController action index there will be echo just find it.

Related

I'm having trouble linking an image from a different folder

<head>
<title> URL Practice </Title>
</head>
<body>
<img src = "./bloo/chicken.png">
</body>
I'm trying to learn how to do relative URL links and I've been trying to get it to link to an image from a folder that's inside the original file. It's not working and I don't understand why, I feel like I've tried every variation.
This is what I'm working with if that helps
Also I'm really new to this, so if you can explain it to me like you would a 3 year old, that would be awesome because that's probably where my level of expertise is.
I understand that the image is in the "bloo" folder. Your HTML file and the bloo folder are both children to the root folder. For you to link to link the image, you need to need to reference it like this
src="bloo/imagename.jpg"
it will reference it correctly that way.
So your code snipest will look like
<img src="bloo/chicken.jpg"/>
Good luck
No space shall be between "src", "=" and "bloo/chicken.png". Also u don't need that dot. you can install "VisualStudioCode" will be easier.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<img src="MyImages/meme.jpg" alt="meme">
</body>
</html>
meme.jpg is inside MyImages folder
enter code here
HTML Input src Attribute
\

Explanation of html:5, html:xml, html5-boilerplate

Can anyone explain the difference between the different html options show in the vscode screenshot below? When to use each one. Thanks!
For me, html and html:xml only generate the opening and closing html tags.
html generates <html></html>
html:xml generates <html xmlns="http://www.w3.org/1999/xhtml"></html>
But html:5 generates a basic boilerplate for any html5 compatible html file. It contains some basic stuff like, doctype, head, body, title tags etc.
html: create only <html></html> tag
html:5 : create a basic html 5 template as below
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
</body>
</html>
html:xml : Usually a <!DOCTYPE> declaration is used to distinguish between versions of HTMLish languages (in this case, HTML or XHTML). More detail about it

Why won't my image load in html even tho I put the image in the same folder?

I'm trying to learn html and I'm trying to add an image, I put the image in the same folder as my html file and named it spoder.png. When I tried to load it up in my browser, the image won't appear and only the alt message comes up. How do I fix this?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<img src="/spoder.png" alt="image cannot load">
</body>
</html>
If it's in the same folder, the src atrribute must be src="spoder.png" (no slash)
Agree with the previous answer and will just add that the leading slash always points back to the root.

<meta charset="utf-8"> still needed today?

I look at the bootstrap4 introduction and see this:
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
Source: https://getbootstrap.com/docs/4.4/getting-started/introduction/
Is <meta charset="utf-8"> still needed today?
I only support browsers with a market share greater than 2%.
it's not necessary but it doesn't hurt to add an single line to your code.

How to replace meta tags with something else

I have a big problem with meta tag. More precisely:
<!DOCTYPE html>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
I have a program that automatically "push" things on eBay (with template). I want responsive template (it is made on bootstrap), but I can not use these tags because this program (literally) cuts it. At this point, all my work on the template goes in vain. Can someone colud help me?