Here we will show you how you can create a web-based desktop application using PHP, CSS, HTML, and JavaScript with the help of PHP Desktop. In fact, PHP Desktop is an easy and simple solution we can use to create very powerful and complex desktop application. What Is PHP Desktop? PHP Desktop is an open source project founded by Czarek Tomczak in 2012 to provide a way for developing native desktop GUI applications using web technologies such as PHP, HTML5, JavaScript and SQLite. Mind you, the development workflow you are used to while creating web applications remains the same. The step of turning an existing website into a desktop application is basically a matter of copy and paste. PHPDesktop is an all-made container that will just swallow your project. With that, you can easily transform an existing website into a desktop application without any modification. When you download PHP Desktop , you will have some set of files and folders; among them you will have a ...
Python code to check which number is greater? # Python program to find the largest number among the three input numbers # take three numbers from user num1 = float(input("Enter first number: ")) num2 = float(input("Enter second number: ")) num3 = float(input("Enter third number: ")) if (num1 > num2) and (num1 > num3): largest = num1 elif (num2 > num1) and (num2 > num3): largest = num2 else: largest = num3 print("The largest number is",largest) Sample Output: Enter first number: 100 Enter second number: 120 Enter third number: 10 The largest number is 120
A cookie is set with the following code: setcookie(name, value, expiration) <?php $Month = 2592000 + time(); //this adds 30 days to the current time setcookie(AboutVisit, date("F jS - g:i a"), $Month); ?> The above code sets a cookie in the visitor's browser called "AboutVisit". The cookie sets the value to the current date , and set's the expiration to be be in 30 days (2592000 = 60 seconds * 60 mins * 24 hours * 30 days.) Now let's retrieve the cookie. <?php if(isset($_COOKIE['AboutVisit'])) { $last = $_COOKIE['AboutVisit']; echo "Welcome back! <br> You last visited on ". $last; } else { echo "Welcome to our site!"; } ?> This code first checks if the cookie exists. If it does, it welcomes the user back and tells them when they last visited. If they are new, it skips this and prints a generic welcome message. TIP: If you are calling a cooking on the sa...
Comments
Post a Comment