Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $dis_ray = array();
- $myray = array();
- $tabray = array();
- $flt_str = '1 html php html~ php~';
- $dir = '/home/myimagefiles/';
- $myray = array_values(array_filter(scandir($dir), function($file) {
- return !is_dir($file);
- }));
- $elm_cnt = count ( $myray );
- $row_cnt = round ( $elm_cnt/3 );
- $itm_cnt = 0;
- echo "EC=> $elm_cnt RC=> $row_cnt IC=> $itm_cnt <br>";
- foreach ( $myray as $file ) {
- $pth_prt = pathinfo ( $file );
- $fil_ext = $pth_prt [ 'extension' ];
- $fil_dir = $pth_prt [ 'dirname' ];
- $ext_pos = strpos ( $flt_str, $fil_ext );
- echo "F=> $file FE=> $fil_ext EP=> $ext_pos FD=> $fil_dir <br>";
- if ( $ext_pos > 0 ) { continue; }
- $dis_ray = $fil_dir.$file;
- }
- ?>
- This is erroring, not an error message, but this garbage:
- ******************************************************************************************
- $elm_cnt RC=> $row_cnt IC=> $itm_cnt
- "; foreach ( $myray as $file ) { $pth_prt = pathinfo ( $file ); $fil_ext = $pth_prt [ 'extension' ]; $fil_dir = $pth_prt [ 'dirname' ]; $ext_pos = strpos ( $flt_str, $fil_ext ); echo "F=> $file FE=> $fil_ext EP=> $ext_pos FD=> $fil_dir
- "; if ( $ext_pos > 0 ) { continue; } $dis_ray = $fil_dir.$file; } /* for ($i = 0; $i <= $row_cnt; $i++) { $dis_itm = $dis_ray[$itm_cnt]; $row_out = "\t\t\n\t\t\t
- ******************************************************************************************
- Stared at this for hours, but not making the connect with what is wrong. Guessing syntax, but not seeing it.
- Also I copied lines #7-9 from a HOWTO webpage, so may be an error in that code, which I'm not seeing.
- ******************************************************************************************
- This is the View Source results. No difference except for "red" color down to line #13 ending at the '>' in the echo statement.
- <?php
- $dis_ray = array();
- $myray = array();
- $tabray = array();
- $flt_str = '1 html php html~ php~';
- $dir = '/home/myfiles/PIX/';
- $myray = array_values(array_filter(scandir($dir), function($file) {
- return !is_dir($file);
- }));
- $elm_cnt = count ( $myray );
- $row_cnt = round ( $elm_cnt/3 );
- $itm_cnt = 0;
- echo "EC=> $elm_cnt RC=> $row_cnt IC=> $itm_cnt <br>";
- foreach ( $myray as $file ) {
- $pth_prt = pathinfo ( $file );
- $fil_ext = $pth_prt [ 'extension' ];
- $fil_dir = $pth_prt [ 'dirname' ];
- $ext_pos = strpos ( $flt_str, $fil_ext );
- echo "F=> $file FE=> $fil_ext EP=> $ext_pos FD=> $fil_dir <br>";
- if ( $ext_pos > 0 ) { continue; }
- $dis_ray = $fil_dir.$file;
- }
- ?>
- ******************************************************************************************
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement