Testing PHP
Posted: Sat Oct 25, 2003 11:23 am
I am very new to PHP. I use flash to create sites but need PHP to include some directory functionality. I found some code for reading a directory, but I am not sure how to test it since you need to have a PHP server.
Can anyone point me in the right direction?
I downloaded 'minixampp' which is supposed to enable PHP for the directory it is installed on, but how can I test this code:
so that I know it is coded properly and doing what I need it to do?
Can anyone point me in the right direction?
I downloaded 'minixampp' which is supposed to enable PHP for the directory it is installed on, but how can I test this code:
Code: Select all
<?
$handle=opendir("/pics");
$counter = 0;
while ($file = readdir($handle)) {
$the_type = strrchr($file, ".");
$is_picture = eregi("jpg",$the_type);
if ($file != "." and $file != ".." and $is_picture) {
$picsї$counter] = $file;
$counter++;
}
}
closedir($handle);
for ($i = 0; $i < count($pics); $i++){
$PicsList .= $mypicsї$i] . "|";
}
$PicsList = substr ($PicsList, 0, -1);
echo (&PicsList=.$PicsList.&);
?>