-1
I’m starting to study PHP, I’m trying to make the image path appear, but returns the following error:
Fatal error: Uncaught Error: Call to Undefined method Image::View() in C: xampp htdocs site home.php:20 Stack trace: #0 C: xampp htdocs app Pages.class.php(17): include() #1 C: xampp htdocs site index.php(123): Pages->__Construct() #2 {main} thrown in C: xampp htdocs site home.php on line 20
Route class:
<?php
class Rotas{
static $pastaFotos = 'fotos/';
static $siteUrl = 'http://localhost/site/';
static $index = 'index.php';
static $detalhe = '?pag=detalhe&item';
}
Picture class:
<?php
class Imagem {
public static function Exibir($imagem, $w, $h){
$fotos = Rotas::$siteUrl . Rotas::$pastaFotos ;
echo $fotos;
}
public static function Upload() {
}
}
home:
<?php
$portfolio = new Conexao();
$portfolio->ExecSQL("select * from trabalhos");
while($ptf = $portfolio->ListarDados()){
echo $ptf['trabalhos_titulo'] . '<br>';
echo Imagem::Exibir('sss', '34', '34');
}
Thanks in advance!
Thank you very much
– user67057
Thank you very much
– user67057