djmartins Posted August 20, 2007 Report Share Posted August 20, 2007 Kas man jaliek pie tabulas tipa, lai taja saglabatos bilde? Link to comment Share on other sites More sharing options...
andrisp Posted August 20, 2007 Report Share Posted August 20, 2007 tabulai nav tipu. Ir tipi laukiem (kolonnai). Ja gribi glabāt binārus datus laukā, tad izmanto BLOB (mysql gadijumā). Link to comment Share on other sites More sharing options...
djmartins Posted August 20, 2007 Author Report Share Posted August 20, 2007 Paldies! Link to comment Share on other sites More sharing options...
Grey_Wolf Posted August 20, 2007 Report Share Posted August 20, 2007 Nevajag bildes glabaat DB ;) normali glabaa tikai Datus par bildi nosaukumu/ & celju kur atrodas... Link to comment Share on other sites More sharing options...
djmartins Posted August 20, 2007 Author Report Share Posted August 20, 2007 Nja es ta tagad pamaniju, ka bilde man nemaz db nesaglabajas bet gan cels kur ta atrodas.Ka es varu panakt ka bilde saglabajas uz servera un adrese db? Link to comment Share on other sites More sharing options...
Grey_Wolf Posted August 20, 2007 Report Share Posted August 20, 2007 char(n) kur n = 1-255 vai ja ar to nepietiek tad text lauks.... ---------------- Link to comment Share on other sites More sharing options...
djmartins Posted August 20, 2007 Author Report Share Posted August 20, 2007 jaa bet vins jau saglaba to celu no kurienes bilde tiek saglabata uz servera neviss kur bilde atrodas patreiz! Link to comment Share on other sites More sharing options...
andrisp Posted August 20, 2007 Report Share Posted August 20, 2007 djmartins, tas ir kā ? Tipa tu gribi saglabāt ceļu, kur bilde atradās uz klienta datora ? Link to comment Share on other sites More sharing options...
djmartins Posted August 20, 2007 Author Report Share Posted August 20, 2007 Nu mana lapa uz eclub hostinga atrodas, uploudojot bildi vina saglabajas uz eclub servera tacu cels datubaze saglabajas no mana pc kur man ta bilde atradas nevis eclub servera cels kur ta bilde tika uploudota. Link to comment Share on other sites More sharing options...
andrisp Posted August 20, 2007 Report Share Posted August 20, 2007 Nu tad skriptā vaina (visticamāk, ka izmanto $_FILES['file']['name']). Bet vispār pilnu ceļu, kāds bija klienta datorā, serveris nekādīgi nevarētu redzēt. Parādi kodi (paste.php.lv). Link to comment Share on other sites More sharing options...
Grey_Wolf Posted August 20, 2007 Report Share Posted August 20, 2007 (edited) Bet vispār pilnu ceļu, kāds bija klienta datorā, serveris nekādīgi nevarētu redzēt elementarna vatson ;) edit: paskaties ko dabuusi ja ar JS paliiziibu papeetiisi lauka vertiibu ;) Buus preciizi dotais celjshh.... -> taalak ti atliek vinju padot uz servera --> un tas arii viss ;) Edited August 20, 2007 by Grey_Wolf Link to comment Share on other sites More sharing options...
andrisp Posted August 20, 2007 Report Share Posted August 20, 2007 Nu tā jā, es runāju par vienkāršu submitētu formu ar file inputiem. :) Link to comment Share on other sites More sharing options...
marcis Posted August 22, 2007 Report Share Posted August 22, 2007 <input type="file" name="f_name" /> echo $_POST['f_name']; kā domā, kas parādīdies? Link to comment Share on other sites More sharing options...
andrisp Posted August 22, 2007 Report Share Posted August 22, 2007 marcis, UNDEFINED index ? Link to comment Share on other sites More sharing options...
Roze Posted August 22, 2007 Report Share Posted August 22, 2007 Nevajag bildes glabaat DB ;)normali glabaa tikai Datus par bildi nosaukumu/ & celju kur atrodas... Drusku atkāpe no tēmas - lai arī jāpiekrīt ka normāli (un lielākajā daļā gadijumu) bildes storēt DB nav vajadzīgs / nav labi utt.. tad pie milzonīgi daudz imāgēm iestājas atkal pretējais - tomēr sanāk normālāk :) Neizmanto gan parastās SQL db bet tā saucamās "Column-Oriented DBMS" Piemērs ir Youtube izmanto Googles BigTable ( http://labs.google.com/papers/bigtable-osdi06.pdf ) Ir arī citas implementācijas .. Bet tas tā .. jautrībai :) Link to comment Share on other sites More sharing options...
Recommended Posts