Top Questions

  • 5.11 Years

    • Category : Php
    • Location : Chandigarh, India
    • Posted On : Jan 10, 2018

    Now generate 'A5' sized PDF from html and display it view. The PDF name will be 'simple_any_name.pdf'.

    <?php
     // INCLUDE THE phpToPDF.php FILE
    require("phpToPDF.php"); 
    
    // PUT YOUR HTML IN A VARIABLE
    $my_html="<HTML>
    <h2>Test HTML 02</h2><br><br>
    <div style=\"display:block; padding:20px; border:2pt solid:#FE9A2E; background-color:#F6E3CE; font-weight:bold;\">
    phpToPDF is pretty cool! <br><br>
    [This was orange, but I set the PDF option to monochrome (Black & White)]
    </div><br><br>
    For more examples, visit us here --> https://www.dorcode.com/
    </HTML>";
    
    // SET YOUR PDF OPTIONS -- FOR ALL AVAILABLE OPTIONS, VISIT HERE:  http://phptopdf.com/documentation/
    $pdf_options = array(
      "source_type" => 'html',
      "source" => $my_html,
      "action" => 'view',
      "color" => 'monochrome',
      "page_orientation" => 'landscape',
      "file_name" => 'simple_any_name.pdf');
    
    // CALL THE phpToPDF FUNCTION WITH THE OPTIONS SET ABOVE
    phptopdf($pdf_options);
    
    ?> 
     
  • 5.7 Years

    • Category : Jquery
    • Location : Unknown
    • Posted On : Mar 29, 2018

    Load more content with jQuery

    <div>Content</div>
    <div>Content</div>
    <div>Content</div>
    <div>Content</div>
    <div>Content</div>
    <div>Content</div>
    <div>Content</div>
    <div>Content</div>
    <div>Content</div>
    <div>Content</div>
    <div>Content</div>
    <div>Content</div>
    <div>Content</div>
    <div>Content</div>
    <div>Content</div>
    <div>Content</div>
    <div>Content</div>
    <div>Content</div>
    <div>Content</div>
    <div>Content</div>
    
    <div>Content</div>
    <div>Content</div>
    <div>Content</div>
    <div>Content</div>
    
    <div>Content</div>
    <div>Content</div>
    <div>Content</div>
    <div>Content</div>
    
    
    <a href="#" id="loadMore">Load More</a>
    
    <p class="totop"> 
        <a href="#top">Back to top</a> 
    </p>


     

    1 Answers

    View More
  • 2.9 Years

    • Category : Php
    • Location : Chandigarh
    • Posted On : Mar 9, 2016

    Fetch blank colum information from database in %.

    <div class="progress">
    
    <?php
    $result = mysql_query("SELECT * FROM `register_users` where `uemail`='$email'");
    while($row = mysql_fetch_row($result)){
        $empty_count = 0;
        $count = count($row);
        for($i = 0; $i < $count; $i  )
            if($row[$i] === '' || $row[$i] === 'NULL')
                $empty_count  ;
       
    
    ?>
      <div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="<?php echo  ''.((int)(100*(1-$empty_count/($count-1)))).'' ?>"
      aria-valuemin="0" aria-valuemax="100" style="width:30%;border: 1px solid #ccc !important;">
     <?php    echo  ''.((int)(100*(1-$empty_count/($count-1)))).'% complete'; ?>
      </div>
      <?php } ?>
    </div>

     

  • 5.11 Years

    • Category : Php
    • Location : Chandigarh, India
    • Posted On : Dec 8, 2015

    1 Answers

    View More
  • 2.9 Years

    • Category : Php
    • Location : Chandigarh
    • Posted On : Feb 17, 2018

    Website visitor using php.

    $datei = fopen(APPPATH."/cache/countlog.txt","r");
    $count = fgets($datei,1000);
    fclose($datei);
    $count=$count +  1 ;
    echo "$count" ;
    // opens countlog.txt to change new hit number
    $datei = fopen(APPPATH."/cache/countlog.txt","w");
    fwrite($datei, $count);
    fclose($datei);
  • 5.11 Years

    • Category : Magento
    • Location : Chandigarh, India
    • Posted On : Apr 4, 2018

    When you’re getting a blank page in Magento 2.x or only error number like Error log record number: (any number), you can enable error reporting in Magento.

    // enable error messages in command line
    php bin/magento deploy:mode:set developer
    
    // enable error messages in file
    Add following code in index.php file :-
    
    error_reporting(E_ALL);
    ini_set('display_errors', 1);
    
    // disable error messages in command line
    php bin/magento maintenance:disable
    Goto app/etc/ and open env.php
    and change current application mode by MAGE_MODE' => 'default' to MAGE_MODE' => 'developer'

    Then,please flush the cache

    you can give a try by renaming local.xml.sample to local.xml under pub/errors
  • 5.11 Years

    • Category : Php
    • Location : Chandigarh, India
    • Posted On : Aug 14, 2015
    array(6) { 
    [0]=> string(0) "" 
    [1]=> string(21) " Subject Hello World " 
    [2]=> string(57) " Bonjour se jserais base sdf sdf sd f sqdf qsfd " 
    [3]=> string(22) " martial@gironde.com2 " 
    [4]=> string(12) " hello byee " 
    [5]=> string(11) " loul fund " } 
    
  • 2.9 Years

    • Category : Wordpress
    • Location : Chandigarh
    • Posted On : Mar 9, 2016
    /**
     * Register a custom menu page.
     */
    function wpdocs_register_my_custom_menu_page() {
        add_menu_page(
            __( 'Bookings', 'textdomain' ),
            'Bookings',
            'manage_options',
            'admin.php?page=booking_diplay',
            'booking_display',
            plugins_url( 'bookin1.png' ),
            6
        );
    }
    add_action( 'admin_menu', 'wpdocs_register_my_custom_menu_page' );
    function booking_display()
    {
     require_once(plugin_dir_path(__FILE__).'booking_display.php');
    }

     

  • 0.0 Years

    • Category : Wordpress
    • Location : Unknown
    • Posted On : Mar 22, 2016

    Get Posts By Sub Category ID in Wordpress.

    <?php query_posts('cat=10&showposts=-1');
               $posts = get_posts('category=10&numberposts=3&offset=0');
                foreach ($posts as $post) : start_wp(); ?>
    
                <?php $cats = get_the_category($post->ID);
                $subcategories = array();
                foreach( $cats as $cat ) {
                $subcats = get_categories('child_of='.$cat->term_id);
                if($subcats) {
                foreach( $subcats as $subcat )
                {  $subcategories[] = sanitize_title($subcat->name); }
                }
                }
                $subcats = array_unique($subcategories);
                if($subcats) {
                $subcats = implode(' ',$subcats);
                $url = wp_get_attachment_url( get_post_thumbnail_id($post->ID, 'thumbnail') );
               // echo '<li class="' . $subcats . '">';
    
                }
                ?>
                    <figure class="mix portfolio-item print">
                        <img class="img-responsive" src="<?php echo $url; ?>" alt="Portfolio Item">
                        <a href="<?php echo $url; ?>" title="Title Four" rel="portfolio" class="fancybox"><span class="plus"></span></a>
                        <figcaption class="mask">
                            <h3><?php the_title(); ?></h3>
                            <span><?php the_content(); ?></span>
                        </figcaption>
                    </figure>
    
    <?php endforeach ?>
    
  • 5.11 Years

    • Category : Css
    • Location : Chandigarh, India
    • Posted On : May 9, 2016

    this css class add your bootstrap modal then see the magic

    rotate {
        transform:rotate(180deg);
        transition:all 0.5s;
    }
    .rotate.in {
        transform:rotate(1800deg);
        transition:all 1.5s;
    }