Skip to content

MohamedShehta2000/CyberPHP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 

Repository files navigation

PHP for Hackers

4f4a8f48-d899-4a13-9228-a726b0dd6be8

Setup Apache & PHP on Linux

sudo apt install apache2  
sudo systemctl start apache2  
sudo systemctl enable apache2  
sudo apt install libapache2-mod-php  

Apache Web Directory

๐Ÿ“‚ Default path: /var/www/html

cd /var/www/html  
ls  # List files  
rm *  # Remove all files (Caution!)  
nano index.php  # Edit PHP file  

Basic PHP Code

<html>
<body>
<?php 
$color = "red"; 
echo "My car is " . $color . "<br>";

function myMessage() {
    echo "Hello world!";
}
myMessage();

function FamilyName($fname) {
    echo "$fname Refnes.<br>";
}
FamilyName("Jani");
?>
</body>
</html>

๐Ÿš€ Happy Hacking!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published