• 23-10-2009, 14:28:48
    #10
    https://www.r10.net/dersler/133030-ph...u-eklemek.html Burada Anlatılmış Gayet basit bir bak istersen .. az önce ck editörü denedim gayet güzel
  • 23-10-2009, 14:52:39
    #11
    Php kodlarını renklendiren bildiğiniz editör mevcut mu?
  • 23-10-2009, 15:51:36
    #12
    Codeking adlı üyeden alıntı: mesajı görüntüle
    Php kodlarını renklendiren bildiğiniz editör mevcut mu?
    PHP: highlight_string - Manual
  • 23-10-2009, 16:44:36
    #13
    Buldum bir tane teşekkürler

    İşine yarayacak olan varsa kodlar

    <style type="text/css">
    .linenum{
        text-align:right;
        background:#FDECE1;
        border:1px solid #cc6666;
        padding:0px 1px 0px 1px;
        font-family:Courier New, Courier;
        float:left;
        width:17px;
        margin:3px 0px 30px 0px;
        }
    
    code    {/* safari/konq hack */
        font-family:Courier New, Courier;
    }
    
    .linetext{
        width:700px;
        text-align:left;
        background:white;
        border:1px solid #cc6666;
        border-left:0px;
        padding:0px 1px 0px 8px;
        font-family:Courier New, Courier;
        float:left;
        margin:3px 0px 30px 0px;
        }
    
    br.clear    {
        clear:both;
    }
    
    </style>
    <?php
    
     function printCode($code, $lines_number = 0)    {
                  
             if (!is_array($code)) $codeE = explode("\n", $code);
            $count_lines = count($codeE);
           
            $r1 = "Code:<br />";
    
             if ($lines_number){           
                    $r1 .= "<div class=\"linenum\">";
                    foreach($codeE as $line =>$c) {    
                        if($count_lines=='1')
                            $r1 .= "1<br>";
                        else
                            $r1 .= ($line == ($count_lines - 1)) ? "" :  ($line+1)."<br />";
                     }
                     $r1 .= "</div>";
             }
    
             $r2 = "<div class=\"linetext\">";
             $r2 .= highlight_string($code,1);
             $r2 .= "</div>";
    
            $r .= $r1.$r2;
    
            echo "<div class=\"code\">".$r."</div>\n";
        }
    
        printCode('<?php $www=file_get_contents("http://google.com");  ?>   ',1);
    ?>