Dsy Network www | forum | my | didattica | howto | wiki | el goog | stats | blog | dona | rappresentanti
Homepage
 Register   Calendar   Members  Faq   Search  Logout 
.dsy:it. : Powered by vBulletin version 2.3.1 .dsy:it. > Didattica > Corsi A - F > Basi di dati ~ informatica triennale > [Progetto] "Blog" Thread Rating: 1 votes, 4.00 average.
Pages (33): « First ... « 12 13 14 15 [16] 17 18 19 20 » ... Last »   Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
khelidan
.grande:maestro.

User info:
Registered: Jun 2003
Posts: 1196 (0.14 al dì)
Location: Milano
Corso: Informatica
Anno: Finito....
Time Online: 13 Days, 12:08:03: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by Gehur
per la gestione dei file, secondo voi è sbagliato fare l'upload del file sul server se nza salvarlo nel db?

se salvo il file dell'utente sul server e nella tabella contenuto salvo le info del file, per esempio
dimensione int
tipo char
titolo char
percorso file char --> il percorso dove è salvato il file nel server

successivamente per visualizzare il file userò delle funzioni di apertura file


io ho fatto allo stesso identico modo!

__________________
Khelidan

23-03-2007 15:10
Click Here to See the Profile for khelidan Click here to Send khelidan a Private Message Find more posts by khelidan Add khelidan to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Gehur
.grande:maestro.

User info:
Registered: Apr 2006
Posts: 519 (0.07 al dì)
Location: Milano
Corso: Informatica
Anno:
Time Online: 3 Days, 0:41:42 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

tu percaso utilizza la fopen per aprire il file?

23-03-2007 15:29
Click Here to See the Profile for Gehur Click here to Send Gehur a Private Message Find more posts by Gehur Add Gehur to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
khelidan
.grande:maestro.

User info:
Registered: Jun 2003
Posts: 1196 (0.14 al dì)
Location: Milano
Corso: Informatica
Anno: Finito....
Time Online: 13 Days, 12:08:03: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by Gehur
tu percaso utilizza la fopen per aprire il file?


Guarda il pezzo in questione lo ha fatto il mio socio però vedo che utilizza file_get_contents e poi formatta il contenuto!

__________________
Khelidan

23-03-2007 15:50
Click Here to See the Profile for khelidan Click here to Send khelidan a Private Message Find more posts by khelidan Add khelidan to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Gehur
.grande:maestro.

User info:
Registered: Apr 2006
Posts: 519 (0.07 al dì)
Location: Milano
Corso: Informatica
Anno:
Time Online: 3 Days, 0:41:42 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

ho visto quella funzione, ma cosa intendi per formattato

scusa ma come sono i parametri, non la capisco bene, il percorso del file lo devo mettere come terzo campo??

Last edited by Gehur on 23-03-2007 at 16:10

23-03-2007 15:56
Click Here to See the Profile for Gehur Click here to Send Gehur a Private Message Find more posts by Gehur Add Gehur to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
khelidan
.grande:maestro.

User info:
Registered: Jun 2003
Posts: 1196 (0.14 al dì)
Location: Milano
Corso: Informatica
Anno: Finito....
Time Online: 13 Days, 12:08:03: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

ho guardato meglio,nella pagina prima(dove c'è solo un anteprima) usa fopen,con primo parametro il percorso completo del file e come secondo i permessi,nella seconda pagina,quella in cui si visualizza completamente la news usa l'altra funzione,con parametro il percorso del file che se lo costrisci a partire dal titolo della news,con formattato intendo che la sistema per la visualizzazione con altro codice html,file_gets_contents restituisce normale testo!

__________________
Khelidan

23-03-2007 16:18
Click Here to See the Profile for khelidan Click here to Send khelidan a Private Message Find more posts by khelidan Add khelidan to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Gehur
.grande:maestro.

User info:
Registered: Apr 2006
Posts: 519 (0.07 al dì)
Location: Milano
Corso: Informatica
Anno:
Time Online: 3 Days, 0:41:42 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

ok, spero di riuscire ad usarle, grazie per ora

23-03-2007 16:22
Click Here to See the Profile for Gehur Click here to Send Gehur a Private Message Find more posts by Gehur Add Gehur to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Gehur
.grande:maestro.

User info:
Registered: Apr 2006
Posts: 519 (0.07 al dì)
Location: Milano
Corso: Informatica
Anno:
Time Online: 3 Days, 0:41:42 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

se provo a stampare da php il valore del campo percorso di tipo char, mi visualizza Resource id #4

faccio
$query = select percorso from contenuto where contenuto.contenuto = 23


EDIT: ora funziona....:?

Last edited by Gehur on 23-03-2007 at 17:08

23-03-2007 16:59
Click Here to See the Profile for Gehur Click here to Send Gehur a Private Message Find more posts by Gehur Add Gehur to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
khelidan
.grande:maestro.

User info:
Registered: Jun 2003
Posts: 1196 (0.14 al dì)
Location: Milano
Corso: Informatica
Anno: Finito....
Time Online: 13 Days, 12:08:03: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

hai fatto pg_fetch_array sul risultato della query?

__________________
Khelidan

23-03-2007 17:26
Click Here to See the Profile for khelidan Click here to Send khelidan a Private Message Find more posts by khelidan Add khelidan to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Gehur
.grande:maestro.

User info:
Registered: Apr 2006
Posts: 519 (0.07 al dì)
Location: Milano
Corso: Informatica
Anno:
Time Online: 3 Days, 0:41:42 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

si l'ho fatto, adesso stavo provando a vedere se riuscivo a passare il valore salvato ma mi da errori

<?php
require('pg_conn.php');
$query = "SELECT * FROM contenuto WHERE contenuto = '24'";
$select_query = pg_query($conn,$query);
$row = pg_fetch_array($select_query);
$percorso = $row["percorso"];
readfile("$percorso");
?>
dove readfile prende in ingresso un percorso e stampa a video

non capisco dove sia l'errore, se per esempio scrivo
readfile("F:\Blog\file/blog.sql");
mi stampa il contenuto

23-03-2007 19:34
Click Here to See the Profile for Gehur Click here to Send Gehur a Private Message Find more posts by Gehur Add Gehur to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Gehur
.grande:maestro.

User info:
Registered: Apr 2006
Posts: 519 (0.07 al dì)
Location: Milano
Corso: Informatica
Anno:
Time Online: 3 Days, 0:41:42 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

lasciamo stare...................TUTTO RISOLTO..............NON FUNZIA:(

credevo........il fatto è che se passo il percorso file(che sarebbe il contenuto del campo della tabella contenuto) in questa manier mi da errore
.....
$row = pg_fetch_array($select_query);
$percorso = ($row["percorso"]);
echo ($percorso); ---->mi visualizza il percorso
readfile($percorso);

oppure

$row = pg_fetch_array($select_query);
$percorso = ($row["percorso"]);
echo ($percorso); ---->mi visualizza il percorso
$fp = fopen($percorso,r);
fseek($fp,2);
$prova = fread($fp,50); //Leggo 50 caratteri partendo dalla posizione corrente
echo ("$prova");
echo "<br />";
fclose($fp);

può essere che il problema sia dato da come salva il valore nel DB

xche in questa maniera funziona..
$p = ("F:\Blog\file\blog.sql");
readfile($p);:ueee::pccrash:

Last edited by Gehur on 24-03-2007 at 09:19

23-03-2007 20:29
Click Here to See the Profile for Gehur Click here to Send Gehur a Private Message Find more posts by Gehur Add Gehur to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Simeon
:D

User info:
Registered: Aug 2004
Posts: 984 (0.13 al dì)
Location: Milano
Corso: Informatica
Anno: IT IS OVER!
Time Online: 14 Days, 19:29:42 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Sentite, visto che si sta avvicinando il giorno della consegna sollevo una faccenda che interessa credo quasi tutti.

Qualcuno saprebbe consigliare un buono spazio WEB che supporti postgresql e php?

Siccome non ho mai fatto niente del genere aggiungo: ma se metto il mio DB su uno spazio WEB, poi da remoto (dal pc dell'uni in pratica) posso accedere ai file .php presenti sul mio pc? Dato che gestisco il login in maniera statica dovrei poterli modificare per cambiare utente.

23-03-2007 20:35
Click Here to See the Profile for Simeon Click here to Send Simeon a Private Message Find more posts by Simeon Add Simeon to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
zonker
.illuminato.

User info:
Registered: Mar 2003
Posts: 200 (0.02 al dì)
Location:
Corso:
Anno:
Time Online: 2 Days, 6:24:53 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Io uso i miei server, ma non è un requisito necessario il fatto che siano consultabili online.

Last edited by zonker on 23-03-2007 at 22:04

23-03-2007 22:01
Click Here to See the Profile for zonker Click here to Send zonker a Private Message Find more posts by zonker Add zonker to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Simeon
:D

User info:
Registered: Aug 2004
Posts: 984 (0.13 al dì)
Location: Milano
Corso: Informatica
Anno: IT IS OVER!
Time Online: 14 Days, 19:29:42 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by zonker
Io uso i miei server, ma non è un requisito necessario il fatto che siano consultabili online.


E come testano se funziona? Nel progetto dice "l'applicazione dovra' essere visionabile su un computer portatile o altro" o qualcosa del genere...

24-03-2007 01:32
Click Here to See the Profile for Simeon Click here to Send Simeon a Private Message Find more posts by Simeon Add Simeon to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
bledar
.arcimaestro.

User info:
Registered: Oct 2003
Posts: 256 (0.03 al dì)
Location:
Corso:
Anno:
Time Online: 6 Days, 3:07:56 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

percio o lo meti online , o ti porti i tuo portatile e fai vedere il progetto dal tou portatile in localhost

24-03-2007 10:15
Click Here to See the Profile for bledar Click here to Send bledar a Private Message Find more posts by bledar Add bledar to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
zonker
.illuminato.

User info:
Registered: Mar 2003
Posts: 200 (0.02 al dì)
Location:
Corso:
Anno:
Time Online: 2 Days, 6:24:53 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

esatto, ti devi portare un portatile.

24-03-2007 11:24
Click Here to See the Profile for zonker Click here to Send zonker a Private Message Find more posts by zonker Add zonker to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 22:19.    Post New Thread    Post A Reply
Pages (33): « First ... « 12 13 14 15 [16] 17 18 19 20 » ... Last »   Last Thread   Next Thread
Show Printable Version | Email this Page | Subscribe to this Thread | Add to Bookmarks

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is ON
 

Powered by: vBulletin v2.3.1 - Copyright ©2000 - 2002, Jelsoft Enterprises Limited
Mantained by dsy crew (email) | Collabora con noi | Segnalaci un bug | Archive | Regolamento | Licenze | Thanks | Syndacate
Pagina generata in 0.077 seconds (67.16% PHP - 32.84% MySQL) con 24 query.