Ir para conteúdo
Fórum Script Brasil

JapZ

Membros
  • Total de itens

    10
  • Registro em

  • Última visita

Tudo que JapZ postou

  1. Boa Tarde, Gostaria de saber se no JSP teria alguma função com as mesmas funcionalidades do header("location: ");. Abraços!
  2. O problema esta nessa linha minha: <link>http://www.oxvoltz.creb.eng.br/teste4/index.php?pag=baladas&id=$id&opt=mais&tipo=$tipo</link> assim como na sua tb, o erro especificamente é esse &. Estou a procura de uma solução já que o & é muito importante no link.
  3. JapZ

    Tira linha excel via PHP

    Bom seguinte, me pediram aqui na empresa uma página em php que carregasse um arquivo em .xls e que retirasse as linhas em branco, deixando assim o arquivo mais compacto. Já tentei de tudo, mas não consegui se alguém que já tenha experiência nesse tipo de coisa pude me ajuda ficarei muito grato. excelwriter.inc.php <?php Class ExcelWriter { var $fp=null; var $error; var $state="CLOSED"; var $newRow=false; function ExcelWriter($file="") { return $this->open($file); } function open($file) { if($this->state!="CLOSED") { $this->error="Error : Another file is opend .Close it to save the file"; return false; } if(!empty($file)) { $this->fp=@fopen($file,"w+"); } else { $this->error="Usage : New ExcelWriter('fileName')"; return false; } if($this->fp==false) { $this->error="Error: Unable to open/create File.You may not have permmsion to write the file."; return false; } $this->state="OPENED"; fwrite($this->fp,$this->GetHeader()); return $this->fp; } function close() { if($this->state!="OPENED") { $this->error="Error : Please open the file."; return false; } if($this->newRow) { fwrite($this->fp,"</tr>"); $this->newRow=false; } fwrite($this->fp,$this->GetFooter()); fclose($this->fp); $this->state="CLOSED"; return; } function deleteRow() { $value=NULL; if($this->state!="OPENED") { $this->error="Error : Please open the file."; return false; } if($this->fp=="<td class=xl24 width=64>$value</td>"){ fwrite($this->fp,""); } if($this->fp=="<tr>$value</tr>"){ fwrite($this->fp,""); } } }?> Excel_TiraLinha.php(Resultado ele limpa o arquivo, e não retira apenas as linhas em branco) <?php include("excelwriter.inc.php"); $excel=new ExcelWriter("myXls.xls"); if($excel==false) echo $excel->error; $excel->deleteRow(); $excel->close(); ?>
  4. Oo <?php // Par défaut : anglais $directoryListing = "Folders in server root (\"www\")"; $noDir = "no folder"; $presentation = "This page display folders in server root. You can delete this page if you want to organize differently the folder. There'e a backup oh this file in &quot;safe&quot; directory (index-safe.php)."; $browser_languages = explode(",", getenv("HTTP_ACCEPT_LANGUAGE")); $nb_browser_languages = sizeof($browser_languages); $browser_lang = ""; // ne pas initialiser $biContinue = true; for ($niI = 0; $biContinue==true && $niI < $nb_browser_languages; $niI++) { $biContinue = false; $lg = explode("-", $browser_languages[$niI]); switch ($lg[0]) { case "fr" : $directoryListing = "R&eacute;pertoire(s) &agrave; la racine du serveur (\"www\")"; $noDir = "aucun répertoire"; $presentation = "Cette page permet de visualiser les r&eacute;pertoires plac&eacute;s &agrave; la racine du serveur. Si vous souhaitez organiser autrement le r&eacute;pertoire &quot;www&quot;, vous pouvez effacer ce fichier. Il en existe une copie de sauvegarde dans le r&eacute;pertoire &quot;safe&quot; (index-safe.php)."; break; case "en" : break; default: $biContinue = true; } } ?> <html> <head> <title>[EasyPHP] - Web Local</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> .text1 {font-family: Arial, Helvetica, sans-serif;font-size: 12px;color: White;text-align : left;} .text2 {font-family: Arial, Helvetica, sans-serif;font-size: 12px;color: Silver;text-align : left;} .titre1 {font-family: Arial, Helvetica, sans-serif;font-size: 12px;font-weight: bold;color: #FFFFFF;} .titre2 {font-family: Arial, Helvetica, sans-serif;font-size: 12px;font-weight: bold;color: #cccccc;} </style> </head> <body bgcolor="#525A73"> <div align="center"> <table width="400" cellspacing="0" cellpadding="0" border="0" align="center"> <tr> <td> <a href="../index.php"><img src="../images_easyphp/titre_easyphp_weblocal.gif" width="387" height="116" border="0"></a> </td> </tr> <tr> </table> </div> <table width="500" border="0" cellspacing="4" cellpadding="0" align="center"> <tr> <td><img src="../images_easyphp/cube_rouge_small.gif" width="18" height="20"></td> <td width="100%" nowrap class="titre1">&nbsp;<? echo $directoryListing; ?>&nbsp;:</td> </tr> </table> <table width="500" border="0" cellspacing="2" cellpadding="0" align="center"> <? $diretorio = 'galeria/'; $rep=opendir($diretorio); $bAuMoinsUnRepertoire = false; while ($file = readdir($rep)){ if($file != '..' && $file !='.' && $file !=''){ if (is_dir($file)){ $bAuMoinsUnRepertoire = true; print("<tr><td nowrap class='text1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>"); print("<td width='100%' class='text1'>"); print("&nbsp;&nbsp;<img src='images_easyphp/dossier.gif' width='23' height='16' align='absbottom'>&nbsp;"); print("<a href='$file/' class='text1'>$file</a>"); print("</td></tr>"); } } } if ($bAuMoinsUnRepertoire == false) { print("<tr><td nowrap class='text1'><div align='center'>-&nbsp; $noDir &nbsp;-</div></td>"); print("</td></tr>"); } closedir($rep); clearstatcache(); ?> </table> <br> <table width="500" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td class="text1"> <? echo $presentation ?> </td> </tr> </table> </body> </html> Se o seu so lista pastas, poderia me passar?
  5. Meu script é parecido com esse, so que o meu so lista diretorios e não lista arquivos, mas para fazer um teste usei esse script e deu u mesmo erro. quando o $dir tem valor "." ele lista normalmente, mas quando muda valor ele n lista. quando coloquei "galeria/" ele não listo nada e deu a msg "No folder", mas existe sim uma pasta la.
  6. Caso eu queira mudar o valor de $dir, porque ele está recebendo o valor "." que é o diretório principal, como eu faço? porque aqui ele estava "." que seria "www" so que não queria que ele listasse essa pasta e sim outra "fotos" que esta logo a frente da www, www > fotos, so que quando coloco "./fotos/" da erro.
  7. Valeu mesmo thelon, axo que já da pra começa. Brigadao
  8. Legal, mas tipo que não sei mexer em Flash. Sei mecher apenas em PHP. Na verdade eu queria pronto, mas e chato pedir assim. então eu queria aprender a fazer.
  9. Gostaria de aprender a fazer um Hotspot como esse. www.codigofonte.com.br > link aonde possui um hotspot para ve-lo funcionando.
  10. JapZ

    (Resolvido) Notice no script PHP

    Custei, mas cadastrei ^^
×
×
  • Criar Novo...