Friday 13 May 2016

Forbidden-403_erro_image

PHP image not fount 404 err:
 -----------------------------------------
Find out the web server user

open up terminal and type lsof -i tcp:80

This will show you the user of the web server process Here is an example from a raspberry pi running debian:

COMMAND   PID     USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
apache2  7478 www-data    3u  IPv4 450666      0t0  TCP *:http (LISTEN)
apache2  7664 www-data    3u  IPv4 450666      0t0  TCP *:http (LISTEN)
apache2  7794 www-data    3u  IPv4 450666      0t0  TCP *:http (LISTEN)
The user is www-data

If you give ownership of the web files to the web server:

chown www-data:www-data -R /opt/lamp/htdocs
And chmod 755 for good measure:

chmod 755 -R /opt/lamp/htdocs
Let me know how you go, maybe you need to use 'sudo' before the command, i.e. sudo chown www-data:www-data -R /opt/lamp/htdocs

if it doesn't work, please give us the output of: ls -al /opt/lamp/htdocs

shareimprove this answer
answered Sep 10 '13 at 17:06

Joeme
32229


http://stackoverflow.com/questions/18724718/error-403-in-loading-resources-like-css-and-js-in-my-index-php

jquery POPUP - with colse and Esc close popup

HTML,js,css full code:
-----------------------------------

<!DOCTYPE html>
<html lang="en-US">

    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
        <meta name="robots" content="all,index,follow" />

        <title>Create Mobile Optimized Modal Window</title>
        <meta name="description" content="Code a basic responsive popup window without using a plugin, that works great on desktop and mobile." />

        <style>
              @import url('http://fonts.googleapis.com/css?family=Open+Sans:400,600,700');

            *, *:before, *:after { margin: 0; padding: 0; box-sizing: border-box; }
            body { background: #2F2556; color: #B9B5C7; font: 14px 'Open Sans', sans-serif; }

            /* You can safely remove the next two lines */
            .top { padding-right: 20px; background: #261F41; text-align: right; }
            a { color: rgba(255,255,255,0.6); text-transform: uppercase; text-decoration: none; line-height: 42px; }
           
            h1 { padding: 60px 0; font-weight: 400; text-align: center; }
            p { margin: 0 0 20px; line-height: 1.5; }
           
            .main { margin: 0 auto; padding: 40px 20px; max-width: 960px; font-size: 19px; line-height: 30px;}
            .main a { color: #DB7580; text-transform: none; }
           
            /* Styling the Popup Window */
            .popup-trigger { display: block; margin: 0 auto; padding: 20px; max-width: 260px; background: #4EBD79; color: #fff;
                             font-size: 18px; font-weight: 700; text-align: center; text-transform: uppercase; line-height: 24px; cursor: pointer; }
              .popup {display: none; position: absolute; top: 100px; left: 50%; width: 700px; margin-left: -350px; padding: 50px 30px;
                      background: #fff; color: #333; font-size: 19px; line-height: 30px; border: 10px solid #150E2D; z-index: 9999;}
              .popup-mobile {position: relative; top: 0; left: 0; margin: 30px 0 0; width: 100%;}       
              .popup-btn-close {position: absolute; top: 8px; right: 14px; color: #4EBD79; font-size: 14px; font-weight: bold; text-transform: uppercase; cursor: pointer;}   
          </style>
           
    </head>

    <body>
   
        <div class="top">
            <a href="http://stanhub.com/create-responsive-popup-modal-window-jquery-no-plugin/">Back to the article (free download)</a>
        </div>

        <h1><a href="http://stanhub.com/create-responsive-popup-modal-window-jquery-no-plugin/">Simple Responsive Popup Window</a></h1>
   
        <a class="popup-trigger">Open Pop Up</a>
       
        <div class="main">
          This is an example of a minimal mobile-friendly modal window. It is developed without using a plugin and with just a few lines of jQuery. Resize your browser to test how it behaves on mobile. <br><br> The functionality is very basic, so you would probably have to built upon it regarding your project needs. Feel free to use this script in any personal or commercial projects. To <a href="http://stanhub.com/create-responsive-popup-modal-window-jquery-no-plugin/">download this demo</a>, please go to the main article on Stanhub.
        </div>
       
        <div class="popup">
          Madrid is a city in Europe and the capital and largest city of Spain. The population of the city is almost 3.2 million and that of the Madrid metropolitan area, around 6.3 million. <br><br>It is the third-largest city in the European Union, after London and Berlin, and its metropolitan area is the third-largest in the European Union after Paris and London. The city spans a total of 604.3 km2 (233.3 sq mi).
          <span class="popup-btn-close">close</span>
        </div>
       
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
       
        <script>
        // Popup Window
        var scrollTop = '';
        var newHeight = '100';

        $(window).bind('scroll', function() {
           scrollTop = $( window ).scrollTop();
           newHeight = scrollTop + 100;
        });
       
        $('.popup-trigger').click(function(e) {
           e.stopPropagation();
         if(jQuery(window).width() < 767) {
           $(this).after( $( ".popup" ) );
           $('.popup').show().addClass('popup-mobile').css('top', 0);
           $('html, body').animate({
                scrollTop: $('.popup').offset().top
            }, 500);  
         } else {
           $('.popup').removeClass('popup-mobile').css('top', newHeight).toggle();
         };
        });
       
        $('html').click(function() {
         $('.popup').hide();
        });

        $('.popup-btn-close').click(function(e){
          $('.popup').hide();
        });

        $('.popup').click(function(e){
          e.stopPropagation();
        });
        // escape btn to close in jquery popup
         window.onkeydown = function( event ) { if ( event.keyCode === 27 ) { $('.popup').hide(); console.log( 'escape pressed' ); } };
        </script>
    </body>
</html>

Detect IE browser apply conditions

Detect IE browser apply conditions :
======================

All version of IE and(windows) OS support.


<script>
    if (window.ActiveXObject || "ActiveXObject" in window) {
        alert("IE")
    }

 else{
        alert('Non-IE');
     }
    </script>

Text overflow at right side .....


Text overflow at right side of page make ..... for continues....

CSS:
=======
.class-left{
    text-overflow: ellipsis;
}

html:=
=======

<div>
<div class="class-left">aaaaaaaaaaaaa></div><div class="right">LINK</div>

React + Typescript_ Module federation _ Micro Front end -Standalone and integrated

Module Federation The Module Federation is actually part of Webpack config. This config enables us to expose or receive different parts of t...