Gå til innhold

theBoss2

Medlemmer
  • Innlegg

    57
  • Ble med

  • Besøkte siden sist

Innlegg skrevet av theBoss2

  1. Hei, jeg bruker time() funksjonen til å få tak i dagens dato og kl, det blir generert en value med 10 tall og det fungerer helt utmerket med hjelp av date() funksjonen for å konvertere datoen og timene som jeg vil ha det, men det ble en utfordring når jeg skulle besteme tiden på forhånd.

     

    La oss si i dag er 04.04.06 og kl 20:10 og vil ha tiden for 06.04.06 kl 15:50, vett noen hvordan jeg skal lage sånn at det blir generert en 10 tall kode som i time() funksjonen bare for denne dagen jeg sier?

     

    Takk

  2. Hei slitter med å få den scripten til å fungere, er det noe galt jeg gjøre her eller?:

    <?php
    $connect = ldap_connect("localhost");
    $set = ldap_set_option($connect, LDAP_OPT_PROTOCOL_VERSION, 3);
    echo $set;
    
    $dn = "o=Mittkompani, c=com";
    $filter="(|(sn=f*)(givenname=mav*))";
    $justthese = array("ou", "sn", "givenname", "mail");
    
    $sr=ldap_search($connect, $dn, $filter, $justthese);
    
    $info = ldap_get_entries($connect, $sr);
    
    echo $info["count"]." entries returned\n";
    
    ?> 

     

    Da skal den i teorien hente alt som ligger på AD som starter med "F" på fornavnet eller "mav" på givenname.

     

    Jeg får følgende feil mld.:

    Warning: ldap_search() [function.ldap-search]: Search: Operations error in C:\Program Files\xampp\htdocs\test.php on line 10

     

    Warning: ldap_get_entries(): supplied argument is not a valid ldap result resource in C:\Program Files\xampp\htdocs\test.php on line 12

    entries returned

     

    Håper noen kan hjelpe meg?

     

    Mvh.

  3. Her er css koden:

    
    div#album_img_bg {
    width  	: 100%;
    background  : url("../defult/img_album_bg.gif") #fff repeat-x;
    margin  	: 0px 0px 10px 0px;
    padding  	: 0;
    text-align  : center;
    }
    
    
    div#photo_start {
    float  	: left;
    color  	: #455995;
    font-weight  : bold;
    text-align  : center;
    width  	: 100%;
    border  	: 1px solid #c6c6c6;
    margin  	: 4px 0px 0px 0px;
    }
    
    a.link_album:link {
    float  	: left;
    margin  	: 10px 8px 0px 8px;
    text-align  : center;
    background  : #FFFFFF;
    border  	: 1px solid #c6c6c6;
    padding  	: 4px;
    }
    a.link_album:active {
    float  	: left;
    text-align  : center;
    margin  	: 10px 8px 0px 8px;
    background  : #FFFFFF;
    border  	: 1px solid #c6c6c6;
    padding  	: 4px;
    }
    a.link_album:visited {
    float  	: left;
    text-align  : center;
    margin  	: 10px 8px 0px 8px;
    background  : #FFFFFF;
    border  	: 1px solid #c6c6c6;
    padding  	: 4px;
    }
    a.link_album:hover {
    float  	: left;
    text-align  : center;
    margin  	: 10px 8px 0px 8px;
    background  : #ffffff;
    border  	: 1px solid #000;
    padding  	: 4px;
    }

     

    Her er HTML fila:

    <div id='photo_start'>
    <div id='album_img_bg'>
     <center>
     	<a href="test.jpg" class='link_album'><img src="test.jpg" border='0'></a>
     </center>
    </div>
    </div>

     

    Den (bilden) vil ikke være i midten, er det noe jeg ikke ser eller? Håper på en rask svar.

     

    Takk

  4. Ikke det beste å bruke JS til dette, da det ikke er alle som har støtte for dette. Det enkelste er nok å bruke en ifram som inkluderer den andre siden som har støtte for PHP.

    5414776[/snapback]

     

    Ja enig med deg det er best med iFrame men ... hvis du vett hvordan du gjør det med JS så hadde det vært fint med å vise det til meg. Må lære det kanskje kan få bruk for det i en annen anledning.

     

    Mvh

    TheBoss2

  5. Hei

     

    Jeg driver å lager en teller (counter) med php og alt fungerer greit. Men problemer er at jeg vil visse den telleren på en anen side en selve phpscriptet er.

     

    La oss si jeg har en adrese: www.minphp.no/minscript.php den henter resultatet. Resultatet vil jeg vise på en annen side www.minhtml.no/htmlfil.html (Den støtter ikke php).

     

    Er det mulig å gjøre det i javascript eller andre måtter?

     

    Mvh.

    TheBoss2

  6. Hei folkens nok en gang trenger jeg hjelp, jeg har en mappe som kaller for test og der har jeg 4 bilder som jeg vil lage thumbs.

     

    Jeg har laget et class og den ser sånn ut:

    ....[code]

     

    Når jeg kjører det så blir førte bilde til thumb men ikke de andre 3. Hva kan være galt? Hvordan kan jeg få det slik at de andre bildene visses også som thumbs?

     

    Mvh.

    TheBoss2

  7. Hei folkens,

    Jeg lastet ned en class og den fungerte bra, jeg får lese mld. osv.

     

    Men det jeg er utt etter er hvordan kan jeg om noen kan hjelpe meg med en ting, headers og body dele dem og begge skal være i en array?

     

    Her er koden:

    class:

    <?php
    /*
    * pop3.php
    *
    * @(#) $Header: /home/mlemos/cvsroot/pop3/pop3.php,v 1.15 2005/10/18 17:43:25 mlemos Exp $
    *
    */
    
    class pop3_class
    {
    var $hostname="";
    var $port=110;
    var $quit_handshake=0;
    var $error="";
    var $authentication_mechanism="USER";
    var $realm="";
    var $workstation="";
    var $join_continuation_header_lines=1;
    
    /* Private variables - DO NOT ACCESS */
    
    var $connection=0;
    var $state="DISCONNECTED";
    var $greeting="";
    var $must_update=0;
    var $debug=0;
    var $html_debug=0;
    var $next_token="";
    
    /* Private methods - DO NOT CALL */
    
    Function Tokenize($string,$separator="")
    {
     if(!strcmp($separator,""))
     {
     	$separator=$string;
     	$string=$this->next_token;
     }
     for($character=0;$character<strlen($separator);$character++)
     {
     	if(GetType($position=strpos($string,$separator[$character]))=="integer")
       $found=(IsSet($found) ? min($found,$position) : $position);
     }
     if(IsSet($found))
     {
     	$this->next_token=substr($string,$found+1);
     	return(substr($string,0,$found));
     }
     else
     {
     	$this->next_token="";
     	return($string);
     }
    }
    
    Function SetError($error)
    {
     return($this->error=$error);
    }
    
    Function OutputDebug($message)
    {
     $message.="\n";
     if($this->html_debug)
     	$message=str_replace("\n","<br />\n",HtmlEntities($message));
     echo $message;
     flush();
    }
    
    Function GetLine()
    {
     for($line="";;)
     {
     	if(feof($this->connection))
       return(0);
     	$line.=fgets($this->connection,100);
     	$length=strlen($line);
     	if($length>=2
     	&& substr($line,$length-2,2)=="\r\n")
     	{
       $line=substr($line,0,$length-2);
       if($this->debug)
       	$this->OutputDebug("$line");
       return($line);
     	}
     }
    }
    
    Function PutLine($line)
    {
     if($this->debug)
     	$this->OutputDebug("C $line");
     return(fputs($this->connection,"$line\r\n"));
    }
    
    Function OpenConnection()
    {
     if($this->hostname=="")
     	return($this->SetError("2 it was not specified a valid hostname"));
     if($this->debug)
     	$this->OutputDebug("Connecting to ".$this->hostname." ...");
     if(($this->connection=@fsockopen($this->hostname,$this->port,$error))==0)
     {
     	switch($error)
     	{
       case -3:
       	return($this->SetError("-3 socket could not be created"));
       case -4:
       	return($this->SetError("-4 dns lookup on hostname \"$hostname\" failed"));
       case -5:
       	return($this->SetError("-5 connection refused or timed out"));
       case -6:
       	return($this->SetError("-6 fdopen() call failed"));
       case -7:
       	return($this->SetError("-7 setvbuf() call failed"));
       default:
       	return($this->SetError($error." could not connect to the host \"".$this->hostname."\""));
     	}
     }
     return("");
    }
    
    Function CloseConnection()
    {
     if($this->debug)
     	$this->OutputDebug("Closing connection.");
     if($this->connection!=0)
     {
     	fclose($this->connection);
     	$this->connection=0;
     }
    }
    
    /* Public methods */
    
    /* Open method - set the object variable $hostname to the POP3 server address. */
    
    Function Open()
    {
     if($this->state!="DISCONNECTED")
     	return($this->SetError("1 a connection is already opened"));
     if(($error=$this->OpenConnection())!="")
     	return($error);
     $this->greeting=$this->GetLine();
     if(GetType($this->greeting)!="string"
     || $this->Tokenize($this->greeting," ")!="+OK")
     {
     	$this->CloseConnection();
     	return($this->SetError("3 POP3 server greeting was not found"));
     }
     $this->Tokenize("<");
     $this->must_update=0;
     $this->state="AUTHORIZATION";
     return("");
    }
    
    /* Close method - this method must be called at least if there are any
        messages to be deleted */
    
    Function Close()
    {
     if($this->state=="DISCONNECTED")
     	return($this->SetError("no connection was opened"));
     if($this->must_update
     || $this->quit_handshake)
     {
     	if($this->PutLine("QUIT")==0)
       return($this->SetError("Could not send the QUIT command"));
     	$response=$this->GetLine();
     	if(GetType($response)!="string")
       return($this->SetError("Could not get quit command response"));
     	if($this->Tokenize($response," ")!="+OK")
       return($this->SetError("Could not quit the connection: ".$this->Tokenize("\r\n")));
     }
     $this->CloseConnection();
     $this->state="DISCONNECTED";
     return("");
    }
    
    /* Login method - pass the user name and password of POP account.  Set
        $apop to 1 or 0 wether you want to login using APOP method or not.  */
    
    Function Login($user,$password,$apop=0)
    {
     if($this->state!="AUTHORIZATION")
     	return($this->SetError("connection is not in AUTHORIZATION state"));
     if($apop)
     {
     	if(!strcmp($this->greeting,""))
       return($this->SetError("Server does not seem to support APOP authentication"));
     	if($this->PutLine("APOP $user ".md5("<".$this->greeting.">".$password))==0)
       return($this->SetError("Could not send the APOP command"));
     	$response=$this->GetLine();
     	if(GetType($response)!="string")
       return($this->SetError("Could not get APOP login command response"));
     	if($this->Tokenize($response," ")!="+OK")
       return($this->SetError("APOP login failed: ".$this->Tokenize("\r\n")));
     }
     else
     {
     	$authenticated=0;
     	if(strcmp($this->authentication_mechanism,"USER")
     	&& function_exists("class_exists")
     	&& class_exists("sasl_client_class"))
     	{
       if(strlen($this->authentication_mechanism))
       	$mechanisms=array($this->authentication_mechanism);
       else
       {
       	$mechanisms=array();
       	if($this->PutLine("CAPA")==0)
         return($this->SetError("Could not send the CAPA command"));
       	$response=$this->GetLine();
       	if(GetType($response)!="string")
         return($this->SetError("Could not get CAPA command response"));
       	if(!strcmp($this->Tokenize($response," "),"+OK"))
       	{
         for(;;)
         {
         	$response=$this->GetLine();
         	if(GetType($response)!="string")
           return($this->SetError("Could not retrieve the supported authentication methods"));
         	switch($this->Tokenize($response," "))
         	{
           case ".":
           	break 2;
           case "SASL":
           	for($method=1;strlen($mechanism=$this->Tokenize(" "));$method++)
             $mechanisms[]=$mechanism;
           	break;
         	}
         }
       	}
       }
       $sasl=new sasl_client_class;
       $sasl->SetCredential("user",$user);
       $sasl->SetCredential("password",$password);
       if(strlen($this->realm))
       	$sasl->SetCredential("realm",$this->realm);
       if(strlen($this->workstation))
       	$sasl->SetCredential("workstation",$this->workstation);
       do
       {
       	$status=$sasl->Start($mechanisms,$message,$interactions);
       }
       while($status==SASL_INTERACT);
       switch($status)
       {
       	case SASL_CONTINUE:
         break;
       	case SASL_NOMECH:
         if(strlen($this->authentication_mechanism))
         	return($this->SetError("authenticated mechanism ".$this->authentication_mechanism." may not be used: ".$sasl->error));
         break;
       	default:
         return($this->SetError("Could not start the SASL authentication client: ".$sasl->error));
       }
       if(strlen($sasl->mechanism))
       {
       	if($this->PutLine("AUTH ".$sasl->mechanism.(IsSet($message) ? " ".base64_encode($message) : ""))==0)
         return("Could not send the AUTH command");
       	$response=$this->GetLine();
       	if(GetType($response)!="string")
         return("Could not get AUTH command response");
       	switch($this->Tokenize($response," "))
       	{
         case "+OK":
         	$response="";
         	break;
         case "+":
         	$response=base64_decode($this->Tokenize("\r\n"));
         	break;
         default:
         	return($this->SetError("Authentication error: ".$this->Tokenize("\r\n")));
       	}
       	for(;!$authenticated;)
       	{
         do
         {
         	$status=$sasl->Step($response,$message,$interactions);
         }
         while($status==SASL_INTERACT);
         switch($status)
         {
         	case SASL_CONTINUE:
           if($this->PutLine(base64_encode($message))==0)
           	return("Could not send message authentication step message");
           $response=$this->GetLine();
           if(GetType($response)!="string")
           	return("Could not get authentication step message response");
           switch($this->Tokenize($response," "))
           {
           	case "+OK":
             $authenticated=1;
             break;
           	case "+":
             $response=base64_decode($this->Tokenize("\r\n"));
             break;
           	default:
             return($this->SetError("Authentication error: ".$this->Tokenize("\r\n")));
           }
           break;
         	default:
           return($this->SetError("Could not process the SASL authentication step: ".$sasl->error));
         }
       	}
       }
     	}
     	if(!$authenticated)
     	{
       if($this->PutLine("USER $user")==0)
       	return($this->SetError("Could not send the USER command"));
       $response=$this->GetLine();
       if(GetType($response)!="string")
       	return($this->SetError("Could not get user login entry response"));
       if($this->Tokenize($response," ")!="+OK")
       	return($this->SetError("User error: ".$this->Tokenize("\r\n")));
       if($this->PutLine("PASS $password")==0)
       	return($this->SetError("Could not send the PASS command"));
       $response=$this->GetLine();
       if(GetType($response)!="string")
       	return($this->SetError("Could not get login password entry response"));
       if($this->Tokenize($response," ")!="+OK")
       	return($this->SetError("Password error: ".$this->Tokenize("\r\n")));
     	}
     }
     $this->state="TRANSACTION";
     return("");
    }
    
    /* Statistics method - pass references to variables to hold the number of
        messages in the mail box and the size that they take in bytes.  */
    
    Function Statistics(&$messages,&$size)
    {
     if($this->state!="TRANSACTION")
     	return($this->SetError("connection is not in TRANSACTION state"));
     if($this->PutLine("STAT")==0)
     	return($this->SetError("Could not send the STAT command"));
     $response=$this->GetLine();
     if(GetType($response)!="string")
     	return($this->SetError("Could not get the statistics command response"));
     if($this->Tokenize($response," ")!="+OK")
     	return($this->SetError("Could not get the statistics: ".$this->Tokenize("\r\n")));
     $messages=$this->Tokenize(" ");
     $size=$this->Tokenize(" ");
     return("");
    }
    
    /* ListMessages method - the $message argument indicates the number of a
        message to be listed.  If you specify an empty string it will list all
        messages in the mail box.  The $unique_id flag indicates if you want
        to list the each message unique identifier, otherwise it will
        return the size of each message listed.  If you list all messages the
        result will be returned in an array. */
    
    Function ListMessages($message,$unique_id)
    {
     if($this->state!="TRANSACTION")
     	return($this->SetError("connection is not in TRANSACTION state"));
     if($unique_id)
     	$list_command="UIDL";
     else
     	$list_command="LIST";
     if($this->PutLine("$list_command".($message ? " ".$message : ""))==0)
     	return($this->SetError("Could not send the $list_command command"));
     $response=$this->GetLine();
     if(GetType($response)!="string")
     	return($this->SetError("Could not get message list command response"));
     if($this->Tokenize($response," ")!="+OK")
     	return($this->SetError("Could not get the message listing: ".$this->Tokenize("\r\n")));
     if($message=="")
     {
     	for($messages=array();;)
     	{
       $response=$this->GetLine();
       if(GetType($response)!="string")
       	return($this->SetError("Could not get message list response"));
       if($response==".")
       	break;
       $message=intval($this->Tokenize($response," "));
       if($unique_id)
       	$messages[$message]=$this->Tokenize(" ");
       else
       	$messages[$message]=intval($this->Tokenize(" "));
     	}
     	return($messages);
     }
     else
     {
     	$message=intval($this->Tokenize(" "));
     	$value=$this->Tokenize(" ");
     	return($unique_id ? $value : intval($value));
     }
    }
    
    /* RetrieveMessage method - the $message argument indicates the number of
        a message to be listed.  Pass a reference variables that will hold the
        arrays of the $header and $body lines.  The $lines argument tells how
        many lines of the message are to be retrieved.  Pass a negative number
        if you want to retrieve the whole message. */
    
    Function RetrieveMessage($message,&$headers,&$body,$lines)
    {
     if($this->state!="TRANSACTION")
     	return($this->SetError("connection is not in TRANSACTION state"));
     if($lines<0)
     {
     	$command="RETR";
     	$arguments="$message";
     }
     else
     {
     	$command="TOP";
     	$arguments="$message $lines";
     }
     if($this->PutLine("$command $arguments")==0)
     	return($this->SetError("Could not send the $command command"));
     $response=$this->GetLine();
     if(GetType($response)!="string")
     	return($this->SetError("Could not get message retrieval command response"));
     if($this->Tokenize($response," ")!="+OK")
     	return($this->SetError("Could not retrieve the message: ".$this->Tokenize("\r\n")));
     for($headers=$body=array(),$line=0;;)
     {
     	$response=$this->GetLine();
     	if(GetType($response)!="string")
       return($this->SetError("Could not retrieve the message"));
     	switch($response)
     	{
       case ".":
       	return("");
       case "":
       	break 2;
       default:
       	if(substr($response,0,1)==".")
         $response=substr($response,1,strlen($response)-1);
       	break;
     	}
     	
     	if($this->join_continuation_header_lines
     	&& $line>0
     	&& ($response[0]=="\t"
     	|| $response[0]==" "))
       $headers[$line-1].=$response;
     	else
     	{
       $headers[$line]=$response;
       $line++;
     	}
     	
     }
     for($line=0;;$line++)
     {
     	$response=$this->GetLine();
     	if(GetType($response)!="string")
       return($this->SetError("Could not retrieve the message"));
     	switch($response)
     	{
       case ".":
       	return("");
       default:
       	if(substr($response,0,1)==".")
         $response=substr($response,1,strlen($response)-1);
       	break;
     	}
     	$body[$line]=$response;
     }
     return("");
    }
    
    /* DeleteMessage method - the $message argument indicates the number of
        a message to be marked as deleted.  Messages will only be effectively
        deleted upon a successful call to the Close method. */
    
    Function DeleteMessage($message)
    {
     if($this->state!="TRANSACTION")
     	return($this->SetError("connection is not in TRANSACTION state"));
     if($this->PutLine("DELE $message")==0)
     	return($this->SetError("Could not send the DELE command"));
     $response=$this->GetLine();
     if(GetType($response)!="string")
     	return($this->SetError("Could not get message delete command response"));
     if($this->Tokenize($response," ")!="+OK")
     	return($this->SetError("Could not delete the message: ".$this->Tokenize("\r\n")));
     $this->must_update=1;
     return("");
    }
    
    /* ResetDeletedMessages method - Reset the list of marked to be deleted
        messages.  No messages will be marked to be deleted upon a successful
        call to this method.  */
    
    Function ResetDeletedMessages()
    {
     if($this->state!="TRANSACTION")
     	return($this->SetError("connection is not in TRANSACTION state"));
     if($this->PutLine("RSET")==0)
     	return($this->SetError("Could not send the RSET command"));
     $response=$this->GetLine();
     if(GetType($response)!="string")
     	return($this->SetError("Could not get reset deleted messages command response"));
     if($this->Tokenize($response," ")!="+OK")
     	return($this->SetError("Could not reset deleted messages: ".$this->Tokenize("\r\n")));
     $this->must_update=0;
     return("");
    }
    
    /* IssueNOOP method - Just pings the server to prevent it auto-close the
        connection after an idle timeout (tipically 10 minutes).  Not very
        useful for most likely uses of this class.  It's just here for
        protocol support completeness.  */
    
    Function IssueNOOP()
    {
     if($this->state!="TRANSACTION")
     	return($this->SetError("connection is not in TRANSACTION state"));
     if($this->PutLine("NOOP")==0)
     	return($this->SetError("Could not send the NOOP command"));
     $response=$this->GetLine();
     if(GetType($response)!="string")
     	return($this->SetError("Could not NOOP command response"));
     if($this->Tokenize($response," ")!="+OK")
     	return($this->SetError("Could not issue the NOOP command: ".$this->Tokenize("\r\n")));
     return("");
    }
    };
    
    ?>

     

    Og test.php:

    <?php
    /*
    * test_pop3.php
    *
    * @(#) $Header: /home/mlemos/cvsroot/pop3/test_pop3.php,v 1.6 2005/10/18 17:44:46 mlemos Exp $
    *
    */
    
    ?><HTML>
    <HEAD>
    <TITLE>Test for Manuel Lemos's PHP POP3 class</TITLE>
    </HEAD>
    <BODY>
    <?php
    
    require("pop3.php");
    
     /* Uncomment when using SASL authentication mechanisms */
    /*
    require("sasl.php");
    */
    
    $pop3=new pop3_class;
    $pop3->hostname="pop3.XXX.no";             /* POP 3 server host name                      */
    $pop3->port=110;                         /* POP 3 server host port                      */
    $user="[email protected]";                        /* Authentication user name                    */
    $password="XXXXXXX";                    /* Authentication password                     */
    $pop3->realm="XXX.no";                         /* Authentication realm or domain              */
    $pop3->workstation="";                   /* Workstation for NTLM authentication         */
    $apop=0;                                 /* Use APOP authentication                     */
    $pop3->authentication_mechanism="USER";  /* SASL authentication mechanism               */
    $pop3->debug=1;                          /* Output debug information                    */
    $pop3->html_debug=1;                     /* Debug information is in HTML                */
    $pop3->join_continuation_header_lines=1; /* Concatenate headers split in multiple lines */
    
    if(($error=$pop3->Open())=="")
    {
     echo "<PRE>Connected to the POP3 server "".$pop3->hostname."".</PRE>\n";
     if(($error=$pop3->Login($user,$password,$apop))=="")
     {
     	echo "<PRE>User "$user" logged in.</PRE>\n";
     	if(($error=$pop3->Statistics($messages,$size))=="")
     	{
       echo "<PRE>There are $messages messages in the mail box with a total of $size bytes.</PRE>\n";
       For($i_1 = 1; $i_1<= 3; $i_1++){
       	$read = $pop3->RetrieveMessage($i_1,$headers,$body,1000);
       	
       }
     	}
     }
    }
    if($error!="")
     echo "<H2>Error: ",HtmlSpecialChars($error),"</H2>";
    ?>
    
    </BODY>
    </HTML>
    

     

    Noen som kan hjelpe?

  8. På root på XAMP har du en mappe som heter: htdocs

    Der lager du alt.

     

    Du ser dem ved å skrive: http://127.0.0.1/(mappenavn)

     

    MySQL følger med og den kjører men det er lurt å lege passord til den

    Gå inn på phpmyadmin (http://127.0.0.1/phpmyadmin) og deretter Privilegier og trykker du for å redigere root brukeren, endre passord og bestemer et passord. Deretter går du på phpmyadmin mappen og finner config. fila og skriver samme passordet der også.

     

    For mer hjelp send pm eller skriv her

  9. Hei jeg har problemer med forumet, det er en IPB forum, og alt fungerte bra fram til at en av administratorene slettet mysql databasen. Heldigvis hadde jeg backup. Men når jeg tar det fram vil ikke topic (mld.) visses. Jeg ser kategoriene og alt ser bra i forumet, det står hvor mange innleg det er postet på hvert kategori men når jeg trykker på X kategori så visses det bare subforumet og ikke noe mer!

     

    Noen som har vært bort i noe sånt?

  10. Hei,

    Jeg vett ikke, kanskje det eksisterer noen innlegg for akkurat det men jeg fant ikke noe (Men hadde heller ikke tid til å lette så mye).

     

    Jeg har 2 tekst filer, som innholder noen nr (som vist nedenfor):

    Text1.txt:

    Nr3

    Nr2

    Nr1

    Nr4

     

    Text2.txt

    Nr2

    Nr5

    Nr5

    Nr8

     

    Jeg skal først ha dem i 2 array og deretter søke gjennom dem for å finne like nr. Hvis et nr finnes på begge tekst filene så skal den være grønt, men hvis den ikke finnes på begge tekst filene så skal det komme rødt for text2.txt og blå for text1.txt

     

    Kan noen lage en kode for det. Eventuelt fortelle litt hvordan jeg kan gjøre det.

     

    Takk på forhånd

    Mvh

    The Boss 2

×
×
  • Opprett ny...