GTcarz - Automotive forums for cars & trucks.

GTcarz - Automotive forums for cars & trucks. (https://www.gtcarz.com/)
-   Chit Chat (https://www.gtcarz.com/chit-chat-2/)
-   -   Anyone firmiliar with PHP? (https://www.gtcarz.com/chit-chat-2/anyone-firmiliar-php-99765/)

meissen 09-12-2005 01:30 PM

Anyone firmiliar with PHP?
 
I can't figure out why this won't work, I found it off of http://px.sklar.com/ and then tweaked it by adding the loop to display all the files in the array...

<?
/*

This script read the filenames from a specified directory and returns them in an array.
The number of filenames is also returned.

Copyleft(L) 1999 Eric Persson, eric@persson.tm, http://www.persson.tm/scripts/

*/

Function searchdir($basedir)
{
global $filelisting, $number;
unset($filelisting);
unset($number);

$handle=opendir($basedir);
while ($file = readdir($handle)) {
if ($file=="." or $file=="..") {
** else {
$filelisting[]="$basedir$file";
**;
**;

$number=sizeof($filelisting);
**;


searchdir("./");
for ($i = 0; $i <= $number; $i++) {
echo $filelisting[$i];
**
echo $number; //echos the size of the array

?>

but when I run this file on my image directory, it doesn't echo anything. :confused:

meissen 09-12-2005 01:33 PM

Why is the closing bracket for {** considered censored by two ** on here, Chad?

paarman97maro 09-12-2005 02:15 PM

php is one of the the only codes i didnt take time to learn...kinda wish i would have so I could help you here :(

Mike Jones 09-12-2005 04:03 PM


Originally Posted by meissenation
Why is the closing bracket for {** considered censored by two ** on here, Chad?

What's it suppose to say because that doesn't make any sense.


All times are GMT -4. The time now is 05:25 PM.


© 2024 MH Sub I, LLC dba Internet Brands

Page generated in 0.07436 seconds with 5 queries