How To Put A Script On Your Site

Table of contents:

How To Put A Script On Your Site
How To Put A Script On Your Site

Video: How To Put A Script On Your Site

Video: How To Put A Script On Your Site
Video: How to Host and Install Any PHP Script Online in 10 Minutes? | Example: Xerochat from Codecanyon 2024, December
Anonim

To prevent the site from being, maybe expressive, but lifeless like a knockout boxer, it is worth adding some interactivity to it. The interactive behavior of the site pages is programmed in one of the scripting languages and the resulting script is saved as a file (or a set of files). On the net you can find a lot of such scripts that implement a wide variety of effects, dialogues, monitoring, voting, etc. Having picked up something you need, you will need to install it on your site.

How to put a script on your site
How to put a script on your site

Instructions

Step 1

First, you need to download what was found on the network to your computer and unpack it (if, of course, the files are packed into an archive). The scripts themselves will most likely have a php or js extension - other types of scripts are rare today. But complex scripts often come with additional files - libraries, styles, pictures, etc. Often this kit also contains instructions for installation and configuration in a text file. Be sure to read it - the author knows better than anyone else all the features of his creations.

Step 2

Now you need to move the unpacked to the server, to your site. Please note that not all files need to be uploaded to the server - instruction files, for example, are completely useless there. You can upload files through a special program using FTP (File Transfer Protocol). There are many such programs (they are called FTP clients), for example, Cute FTP, FlashFXP, FileZilla, WS FTP, Smart FTP … But, as you understand, installation, mastering and configuration will take time, no matter how good and understandable the program is. There is an alternative - most likely in your hosting control panel there is a built-in file manager that allows you to upload what you need directly through your browser. Nowadays it is difficult to find a hosting provider that does not provide such an opportunity. It remains only to find where exactly in your control panel it is located - they are different for different hosters. As a rule, when uploading through a file manager, no additional manipulations with files are required. And when downloading via FTP-client, an additional operation may be required - “setting user rights”. If your script writes something to files, then these files should be set to the read attribute = 777, and the executable scripts themselves = 755 or 644. Depending on the server settings, these attributes may differ, if something goes wrong, these details follow clarify in the hosting technical support. The setting of file attributes in different FTP clients is implemented differently, perhaps in your program this option will be called CHMOD (this is an abbreviation for CHange MODe).

Step 3

Connection actions are very different for each specific script - you simply cannot do without instructions, which were either in the downloaded set of files, or on the page of the site - the source of the script. The easiest option is to include a link to the desired file in the html page code. To JavaScript, this might look like inserting a tag before the tag of the desired page. For a php script, the corresponding tag may look like this: include "myScript.php"; and it should be inserted immediately after the <? Php at the beginning of the php file. But we will repeat once again - specific instructions should come with the script. If they are not there, perhaps it is better to look for a replacement for such a script.

Recommended: