Wednesday, April 26, 2017

How to include Javascript file in php file

How to include Javascript file in php file
How to include Javascript file in php file?

    <script type="text/javascript" src="example.js"></script>

Sample example.js file content:

function _encrypt($in)
{
    /*Your code here*/
    return $out;
}

function _decrypt($in)
{
    /*Your code here*/
    return $out;
}

How to include php file in another php file

How to include php file in another php file
How to include php file in another php file?

    <?php include("example.php"); ?>

Sample example.php file content:

<?php
    function _encrypt($in)
    {
        /*Your code here*/
        return $out;
    }

    function _decrypt($in)
    {
        /*Your code here*/
        return $out;
    }
?>

How to include CSS file in html file

How to include CSS file in html file
How to include CSS file in html file?

    <head>
        <link rel="stylesheet" type="text/css" href="style.css" />
    </head>

Sample style.css file content:

/*Body Background*/
body
    { background-color: orange; }

/*Custom Alert*/
.modalclass {display: none; position: absolute;    left: 35%; top: 30%; width: 30%; height: auto; }
.modalclass-content { position: relative; border: 1px solid black; width: 100%; background-color: white; color: black; }
.closeclass { color: white; float: right; font-size: 24px; font-weight: bold; }
.closeclass:hover, .closeclass:focus { color: #000; text-decoration: none; cursor: pointer; }
.modalclass-header { padding: 10px 16px 12px; background-color: #AD4F39; color: white; }
.modalclass-body { padding: 10px 16px; Height:25px; }
.modalclass-footer { padding: 2px 16px; background-color: gray; color: white; text-align: right; }