Tag : Base URL


How to remove # from URL in AngularJS?

If you work on AngularJS web application using angular route then you notice one thing. If you click on any hyper links it makes like as bellow: <pre> http://localhost:8000/# http://localhost:8000/#/items http://localhost:8000/#/users </pre> I mean always "#" will be there, But when we live this web application then it should delete "#" from URL, because it makes issue when we share link on facebook or etc. But should look likes: <pre> http://localhost:8000/ http://localhost:8000/items http://localhost:8000/users </pre> But we can remove easily using "$locationProvider.html5Mode(true);". Yo.....

By Hardik Savani | September 18, 2016 | | 890 Viewer | Category : AngularJS
READ MORE

How to get filename without extension in PHP?

If you need to get just filename from url withour file extension then you can get that using basename() php function. In bellow example i give you how to get image name without extension. first we need to get extension of given filename url and then basename() through we can remove that extension like as i did bellow: <strong>Example:</strong> <pre class="prettyprint lang-php"> $imagePath = "/home/hd/html/test.jpg"; $ext = pathinfo($imagePath, PATHINFO_EXTENSION); <br/> $file = basename($imagePath,".".$ext); print_r($file); </pre>

By Hardik Savani | May 26, 2016 | | 664 Viewer | Category : PHP
READ MORE

How to get current page url in PHP?

Whenever you need to get actual page url in Native PHP then you can do using this post. I give you the example that way you can get easily current URL in PHP. following PHP code through you can get: <strong>Example:</strong> <pre class="prettyprint lang-php"> $currentLink = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; print_r($currentLink); </pre>

By Hardik Savani | May 2, 2016 | | 743 Viewer | Category : PHP
READ MORE

How to get site URL in Laravel 5?

Here is quick post, which can help you to get base url or home page url of your laravel application. I think many times we need to get site URL for something share or link, so you can get that using url helper and URL facade. Both way are same you can use that anywhere i mean in controller or view. so let's see. <strong>Example:</strong> <pre class="prettyprint lang-php"> $url = URL::to("/"); print_r($url); <br/> $url2 = url('/'); print_r($url2); </pre>

By Hardik Savani | April 11, 2016 | | 2552 Viewer | Category : Laravel
READ MORE

    How to get last inserted id in Codeigniter?

    How to get last inserted id in Codeigniter?

    Open Post

    Select box with search option example in Jquery using Chosen Plugin

    Select box with search option example in Jquery using Chosen Plugin

    Open Post

    How to integrate stripe payment gateway in Laravel 5.4 Application ?

    How to integrate stripe payment gateway in Laravel 5.4 Application ?

    Open Post

    How to call AngularJS controller function in Jquery?

    How to call AngularJS controller function in Jquery?

    Open Post

    Laravel 5 client side validation using Parsley.js example

    Laravel 5 client side validation using Parsley.js example

    Open Post

    PHP - How to compress PNG image using pngquant?

    PHP - How to compress PNG image using pngquant?

    Open Post