php-windows Digest 23 Jul 2003 10:17:50 -0000 Issue 1836

Topics (messages 20866 through 20872):

Re: Subject: xml trouble  - Operator error : XML file not supplied
        20866 by: Neil Smith

Web pages not being displayed
        20867 by: Greg Whitehead

Listing directory files in individual cells in a html table
        20868 by: Peter Houchin
        20871 by: Luis Moreira

combo boxes
        20869 by: Raul IONESCU <LYNX Fil Impex

ActivePHP - is working?
        20870 by: WebDevMagazine

session problem
        20872 by: tana dsasa

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message --- 1/ Is the XML file in the same directory as the script you are running ?
2/ You have not supplied your XML file, and a parse error is cause when an invalid XML file is read in.
3/ Do you have error_reporting(E_ALL) set in your script which would provide more diagnostic error information and an error code ?


Please supply the source file so we can verify it is valid and / or well formed.

Cheers - Neil.

At 21:16 22/07/2003 +0000, you wrote:
Message-ID: <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
From: "BlackZ" <[EMAIL PROTECTED]>
Date: Wed, 23 Jul 2003 00:52:59 +0600
Subject: xml trouble under Apache
MIME-Version: 1.0

Just a script:
<?
if(!$dom = domxml_open_file("test1.xml")) {
  echo "Error while parsing the document\n";
  exit;
}
.......
?>
It running well in console mode.
But when I'm point my browser to one
it says: "Error while parsing the document".
Apache log says: "Error parsing xml-file"

1. DOMXML enabled under PHPINFO.
2. path to xml file is correct

Please help !!!


--- End Message ---
--- Begin Message ---
Hi All

I could use some help. I have a problem with which I am not sure if its
PHP4.3.2, MySQL4.0.13 or Apache2.0.46 all running on windows XP.
The problem is I have a web page that shows a list of data (20 items) from
MySQL database using PHP script and I get varying results when I view this
page:

page displays normally (very seldom).
page displays header only.
page displays nothing (most commonly).
page displays a few entries then stops.
page displays the page with some weird code being displayed beside the
header (uppercase P and square box with a ? following).

MySQL logs don't show any problem accessing the data.

I have tried using the both Internet Explorer and Netscape, both browsers
give similar problems. Netscape seems to more tolerant than Explorer.
Continued refreshing will get the page to eventually display in Netscape but
this does not happen with Explorer.

Anyone have any ideas what might be my problem ?

Thanks in Advance

Greg Whitehead



--- End Message ---
--- Begin Message ---
Howdy 

I have a script that lists files from a directory. What I want to do is
spilt the result up so that files are displayed into a html table that
is 8 colums wide and how ever many rows are needed. 
( my script is below )

Any help would be aprechiated

Cheers 

Peter


Heres my script

<table width="92%"  border="0" align="center" cellpadding="0"
cellspacing="1" >
<?php
/*
* This little example prints a sorted directory 
* listing, with dirs first and files afterwards.
*/

// Open current directory
if($handle = opendir("./images")){
 
 // Loop through all files
 while(false !== ($file = readdir($handle))){
   
   // Ignore hidden files
  if(!preg_match("/^\./", $file)){
     
     // Put dirs in $dirs[] and files in $files[]
     if(is_dir($file)){
      $dirs[] = $file;
     }else{
       $files[] = $file;
    }
   }
 }
 
 // Close directory
closedir($handle);

 // if $dirs[] exists, sort it and print all elements in it.
 if(is_array($dirs)){
   sort($dirs);
  foreach($dirs as $dir){
    # echo "<a href=\"$dir/\">$dir/</a><br />\n";
        echo "";
  }
 }

 // if $files[] exists, sort it and print all elements in it.
 if(is_array($files)){
   sort($files);
   foreach($files as $file){
   $ext = strtolower(end(explode('.', $file)));
   if ($ext == 'jpg' ||$ext == 'jpeg' ||$ext == 'png') {
      echo "<tr><td><a href=\"images/$file\" target=\"_blank\"><img
src=thumb.php?$file></a>\n</td>\n</tr>";
    } else {
        echo "";
   }
  }
 }
}
?>
</td></tr></table>




--- End Message ---
--- Begin Message ---
This will do the trick (no tested, written on the fly)
Luis

// column counter
$n = 1;

// start the record
print "<tr>";

foreach($files as $file){
     print "<td>$file</td>";
    // another column
    $n++;
    // if 8, then
    if ($n==8)
    {
        // close record, open new, and reset counter
        print "</tr><tr>";
        $n = 1;
    }
}

----- Original Message -----
From: "Peter Houchin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 23, 2003 7:35 AM
Subject: [PHP-WIN] Listing directory files in individual cells in a html
table


> Howdy
>
> I have a script that lists files from a directory. What I want to do is
> spilt the result up so that files are displayed into a html table that
> is 8 colums wide and how ever many rows are needed.
> ( my script is below )
>
> Any help would be aprechiated
>
> Cheers
>
> Peter
>
>
> Heres my script
>
> <table width="92%"  border="0" align="center" cellpadding="0"
> cellspacing="1" >
> <?php
> /*
> * This little example prints a sorted directory
> * listing, with dirs first and files afterwards.
> */
>
> // Open current directory
> if($handle = opendir("./images")){
>
>  // Loop through all files
>  while(false !== ($file = readdir($handle))){
>
>    // Ignore hidden files
>   if(!preg_match("/^\./", $file)){
>
>      // Put dirs in $dirs[] and files in $files[]
>      if(is_dir($file)){
>       $dirs[] = $file;
>      }else{
>        $files[] = $file;
>     }
>    }
>  }
>
>  // Close directory
> closedir($handle);
>
>  // if $dirs[] exists, sort it and print all elements in it.
>  if(is_array($dirs)){
>    sort($dirs);
>   foreach($dirs as $dir){
>     # echo "<a href=\"$dir/\">$dir/</a><br />\n";
> echo "";
>   }
>  }
>
>  // if $files[] exists, sort it and print all elements in it.
>  if(is_array($files)){
>    sort($files);
>    foreach($files as $file){
>    $ext = strtolower(end(explode('.', $file)));
>    if ($ext == 'jpg' ||$ext == 'jpeg' ||$ext == 'png') {
>       echo "<tr><td><a href=\"images/$file\" target=\"_blank\"><img
> src=thumb.php?$file></a>\n</td>\n</tr>";
>     } else {
> echo "";
>    }
>   }
>  }
> }
> ?>
> </td></tr></table>
>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


--- End Message ---
--- Begin Message ---


 Be more specific. Send HTML code. If it is what I think you ment then the problem is 
very easy solved through JavaScript and MySQL querryies (and PHP of course, but 
basically JavaScript is most important part).
 
 -----------------------------------------------------------------
 Raul IONESCU - IT Technician & WebMaster
 LYNX Fil Impex (www.lynx.ro)
 Art Business Romania (www.artbusinessromania.com)
 e-mail: [EMAIL PROTECTED], [EMAIL PROTECTED]
 Tel/Fax:  +4021 3103002, +4021 3159230, +4021 3145190, +4021 3143875
 
 
> ----- Original Message ----- 
> From: "Isai Arasu" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, July 22, 2003 10:10 PM
> Subject: [PHP-WIN] combo boxes
> 
> 
> > I have comboboxes filled dynamically using PHP
> > scripts, when i change the selection all my form
> > fields' values must be changed (pulled from database).
> > How do i do that. I m using Apache.
> > 
> > Isai.
> > 
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! SiteBuilder - Free, easy-to-use web site design software
> > http://sitebuilder.yahoo.com
> > 
> > -- 
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> > 
> >

--- End Message ---
--- Begin Message ---
Hi folks
I just compiled phpactivescript.dll and register it into my registry.But
when i try to execute some client side script there is errors, please help!


Bogomil Shopov
http://webdevmagazine.co.uk/n/



--- End Message ---
--- Begin Message ---
I have installed an user-login aplication on my website ( 
http://www.norbertnet.ro ) but i have problems with session controls.
I receive all kinds of warnings and i don't know how to interpret them
 
thanks advanced


---------------------------------
Want to chat instantly with your online friends? Get the FREE Yahoo!Messenger

--- End Message ---

Reply via email to