How To Execute The Script

Table of contents:

How To Execute The Script
How To Execute The Script

Video: How To Execute The Script

Video: How To Execute The Script
Video: How to Execute Any Script In Roblox 2020 2024, December
Anonim

Writing or choosing a useful web script is half the battle; you still need to find a way to execute it. Let's take a closer look at what is needed to execute the most common types of scripts.

How to execute the script
How to execute the script

Instructions

Step 1

A prerequisite for the execution of any script (that is, a script), of course, is the presence of the performer himself. With regard to Internet programming languages, such an executor will be a scripting language interpreter. Depending on where the script is to be executed, the language interpreter can be either part of the server software or part of the browser code. Therefore, to execute any server-side script (for example, php- or perl-script), you must have a running server. The server can be picked up on the network and installed on your computer. The Denver server software package is very popular, for example, among Russian-speaking programmers because of its relative simplicity and free-of-charge value. And you can not be fooled with installing a server at home, but use the services of a hosting provider. The provider will give you access to its server, and all the worries of maintaining and maintaining it will not concern you. Usually such services are paid, but not expensive.

Step 2

The situation is different with "client" scripts. These are scripts that must be executed directly in the browser. To execute such a script, written, for example, in JavaScript, apart from a browser and a simple text editor (a standard notepad is suitable), nothing else is required. For example, here's a simple script: var now = new Date ();

document.write ("This script was executed in" + now.getHours () + "hours" + now.getMinutes () + "minutes"); To execute it, you just need to save this code in a file with the html extension (for example, test. html) and then run it with a double click. The html (HyperText Markup Language) extension is reserved in the operating system for files containing web pages. Therefore, the OS will launch your browser and pass it the address of this file, and the browser will recognize the script, read and execute its script. As a result, we will see a page as simple as the script it contains:

Recommended: