Welcome to the forum 👋, Guest

To access the forum content and all our services, you must register or log in to the forum. Becoming a member of the forum is completely free.

  • PËRSHËNDETJE VIZITOR!

    Nëse ju shfaqet ky mesazh do të thotë se ju nuk jeni regjistruar akoma. Anëtarët e rregjistruar kanë privilegjin të marrin pjesë në tema të ndryshme si dhe të komunikojnë me anëtarët e tjerë. Bëhu pjesë e forumit Netedy.com duke u REGJISTRUAR këtu ose nëse ke një llogari KYCU. Komunikim alternative i ketij forumi me vajza dhe djem nga te gjithe trevat shqiptare? Hyr ne: CHAT SHQIP.

Fillo programim ne PHP.

centos

ⓃⒺⓉⒺⒹⓎ.ⒸⓄⓂ
ANETAR ✓
Regjistruar më
Dhj 13, 2004
Mesazhe
39,792
Fillimi gjithmone eshte i veshtire por nese keni vullnet mundeni me e mesuar shum shpejt!
Se cfare eshte PHP e gjeni ketu: https://forum.netedy.com/threads/cfare-eshte-php.23/

Programimi ne PHP fillon fillimisht nga File.
Filet PHP serviren nga CMD (Command Line) ose nga nje WebServer.
Filet PHP gjithmone mbarojne me: test.php test.php3 test.php4 test.php5 por e pergjithshmja eshte .php

File .php brenda duhet te startoje me kete: <?php
Dhe duhet te perfundoje me: ?>

Shembull i nje File qe te lexojme Hello World!

PHP:
<?php   //Fillimi

print_r("Hello World!");

//Mbarimi
?>
E ngarkoni ne webserver(host) dhe vizitoni linkun per ta pare ne funksion.
 
Si te shfaqim Tekst nga PHP

PHP:
<?php   //Fillimi


//METODA 1 echo
echo "Molecule";



// DEKLAROJM VARIABEL
$nickname = "molecule";
echo $nickname;



// METOD TJETER.
echo "Hello, pseudonimi im eshte ".$nickname;




//Mbarimi
?>

Eshte e rendesishme te keni imagjinate si te luani me keto gjerat e vogla qe po ju tregoj. Sepse me kto ju mund te ndertoni aplikacione te ndryshme dhe te medha.
 
Le te mesojme variablat, nje aplikacion i thjeshte me variabla qe printon Hello World! ne fund.
PHP:
<?php //fillim   
 $a = "He";
 $b = "llo";
 $c = "Wo";
 $d = "rld!";
    
// Nxjerrim tekstin nga variablat:
// NE MENYR TE RREGULLT [ Hello World! ]
echo "{$a}{$b}{$c}{$d}<br/>";

// NE MENYR TE C'RREGULLT [ Wollorld!He ]
echo "{$c}{$b}{$d}{$a}";

// mbarim
?>

Screenshot:
jhU7TusdScuokc-_ROsSGw.png
 
Kombimini i gjuheve te programimit me HTML dicka e thjeshte:

PHP:
<?php // fillim
$nickname = "molecule";

echo "<b/>Ola!</b>, <b>p</b>seudonimi im eshte: <u>$nickname</u>";

//mbarim
?>

Rezultati:
l7BUFvqjShibbIgdRV0UZg.png
 
Last edited by a moderator:

Theme customization system

You can customize some areas of the forum theme from this menu.

Choose the color combination according to your taste

Select Day/Night mode

You can use it by choosing the day and night modes that suit your style or needs.

Welcome to the forum 👋, Guest

To access the forum content and all our services, you must register or log in to the forum. Becoming a member of the forum is completely free.