Jump to content

sagnik

Members
  • Posts

    478
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by sagnik

  1. Ok thanks, I've followed you.

     

    Browscap provides the details of user's browser, device & platform. In fact, the name, version,build manufacturer of the browser and platform/os and name, model, date of manufacture, etc of device which is the user using. full_php_browscap.ini takes around 55.56MB size.

     

    Browscap need to be set as a directive in php.ini, like,

     

    [browscap]
    browscap = "C:\php\extras\full_php_browscap.ini"
    
    If you add full_php_browscap.ini directive, it will be a great help, because I have used it in my registration and login page. If it cannot be added, then I have to change my whole registration and login related files.
  2. If I set a variable with the path in my config file then also I've to include the config file like you explained:

    <?php

    require_once('/home/sgn/public_html/nm/public_html/mobile/global/header.php');

    ?>

    So what will be the advantage of storing the value to a variable??

    And what about browscap? Can I use browscap? If yes then how? If not then, what is an alternative of browscap?

  3. I've 3 domains which can access the folder "mobile". Roots for the domains will be different so the path to reach the folder "mobile" from different domains will be different. Document Roots for the domains are: "sgnetworks.cu.cc": "/home/sgn/public_html", "netmate.cu.cc": "/home/sgn/public_html/nm/public_html", "m.netmate.cu.cc": "/home/sgn/public_html/nm/public_html/mobile". So I've to use this block of code to include header and footer:

    <?php
    if($_SERVER['DOCUMENT_ROOT'] == "/home/sgn/public_html/nm/public_html/mobile"){
    $docRoot = $_SERVER['DOCUMENT_ROOT'];
    } else if($_SERVER['DOCUMENT_ROOT'] == "/home/sgn/public_html/nm/public_html"){
    $docRoot = $_SERVER['DOCUMENT_ROOT']."/mobile";
    } else if($_SERVER['DOCUMENT_ROOT'] == "/home/sgn/public_html"){
    $docRoot = $_SERVER['DOCUMENT_ROOT']."/nm/public_html/mobile";
    }
    require_once $docRoot."/global/header.php";
    ?>
    
  4. I've did it. I've automatically included header.php and footer.php using php.ini directive "auto_prepend_file" & "auto_append_file" in localhost with HTTPD. Now my question is can I do it in HelioHost in anyhow? Like using .htaccess, php.user.ini or any other things. And one more thing, I need to use "browscap", can you please add "full_php_browscap.ini" in the php.ini or allow me to do so by any method?

  5. I want to merge 3 or 4 rows into one with the previous row. See here: http://netmate.cu.cc/mobile/tos2.php, what I want to do is, merge all the text after section 8. Registration and before section 9. Posts with the section 8 and make it fit in one section (div) using PHP. How can I do it??? Here is the code:

    <?php
    require_once $_SERVER['DOCUMENT_ROOT']."/mobile/global/header.php";
    ?>
    <br/>
    <?php
    function get_subsection($sid,$db){
    	if(!empty($sid)){
    		$q=db_query("SELECT ssid,ssvalue FROM terms WHERE sid='$sid'", $db);
    		if($q){
    			if(db_num_rows($q) > 0){
    				while($r=db_fetch_array($q)){
    					return $r['ssid'].".) ".$r['ssvalue'];
    				}
    			}
    		}
    	}
    }
    ?>
    <?php
    $q=db_query("SELECT sid,section,svalue,ssid,ssvalue FROM terms  ORDER BY sid,ssid ASC",$db1);
    if($q) {
    	if(db_num_rows($q) > 0) {
    		echo "<div class='panel-group'>";
     		while($r=db_fetch_array($q)) {
    			echo "<div class='panel panel-default'>";
     				echo "<div class='panel-heading'>".$r['sid'].".".$r['section']."</div>";
     				echo "<div class='panel-body'>".$r['svalue'];
    					echo "<span class='subsection'>".get_subsection($r['sid'], $db1)."</span>";
    				echo "</div>";
     			echo "</div>";
    		}
    		echo "</div>";
    	}
    }
    ?>
    <?php
    require_once $mGlobal."footer.php";
    ?>
    
×
×
  • Create New...