Jump to content
php.lv forumi

Ugga

Reģistrētie lietotāji
  • Posts

    180
  • Joined

  • Last visited

Posts posted by Ugga

  1. pag pag, bet iekš klases definīcijas tak ir jāizmanto $this-> priekš klasē esošajiem mainīgajiem...vai ne tā?

    atvainojos, ka pārējo skriptu neieliku, bet nu te viņš nav būtisks.

    varbūt kāds var palīdzēt? kur tur vajag kādu " ' "???

  2. ...
    var $seshid;
    var $sessdata;
    var $err;
    var $err_no;
    var $expire_time=900; // length of time until expiration in seconds
    var $userid;
    // Define the methods:
    
    function Session($this->seshid,$this->userid=0) //#19 Šeit rāda kļūdu
    {
    }
    ....
    // connect to MySQL

     

    Kāpēc man viņš met ārā kļūdu: Parse error: parse error, expecting `')'' in z:\home\localhost\www\inc\session.inc.php on line 19 ?

     

    Itkā viss pēc ebūka...

  3. Hmm..Iemaucu šo kodu no php.net:

     

    <?php
    $file = fopen ("http://localhost/index.php", "r");
    if (!$file) {
      echo "<p>Unable to open remote file.\n";
      exit;
    }
    while (!feof ($file)) {
      $line = fgets ($file, 1024);
      /* This only works if the title and its tags are on one line */
      if (eregi ("<title>(.*)</title>", $line, $out)) {
       $title = $out[1];
       break;
      }
    }
    fclose($file);
    ?>

     

    allow_url_fopen = On

     

    Kā palaižu skriptu tā Windows izmet :PHP Script Interpreter has encountered a problem and needs to close. We are sorry for the inconvenience.

     

    Error_log failā ir: Premature end of script headers: c:/php/php.exe.

     

    Kas par bumbām? Netieku pat tiktāl ka būtu "Unable To Open Remote File". Itkā viss ir pareizi

  4. Lasu grāmatu un lūk example:

     

    // Declare and define the function
    function cube($num) {
    return $num * $num * $num; // Returns $num
    }
    // Invoke the cube() function:
    echo (cube(6)); // Prints 216

  5. Nu es te 1999 gada ebūku lasu un tur ir sekojošs teksts:

     

    .....The include statement also accesses an external file of code, but it evaluates and executes the code in
    the external file each time that the include statement is encountered, rather than just replacing itself
    with the external code once at the beginning of execution. Suppose we have three files, named
    file1.php, file2.php and file3.php, which contain code we want to include in another PHP
    pahe. With include, we can do this:
    
    for ($i = 1; $i <= 3; ++$i) {
    include("file" . $i . ".php");
    }
    If we tried this with require, the contents of file1.php would replace the require statement on
    the first iteration of the loop, and that code would thus be re-executed on the subsequent iterations.........

     

    Bet tur bija arī piebilde, ka kopš PHP4 tas tā vairs nav.

     

    Vnk interesanti. ;)

×
×
  • Create New...