Hello Everybody!
My first post, this site seems great,
i want to get started right away:
The goal is to create the main page of a new website. in the same directory will be some pictures and the idea is to post all the *.jpg files in the main webpage. The dialema is that these jpg files have weird names, so i want to create some code for the index that will include all pictures.
Thanks!
Hello coders all over the world
Moderator: General Moderators
Re: Hello coders all over the world
Hello iknowu99, and welcome to forum!
You could make a code to read all imagenames in array, and echo them inside html code to be shown as images..
You could make a code to read all imagenames in array, and echo them inside html code to be shown as images..
Re: Hello coders all over the world
i dont know the names of the jpg's, would that be fine to get an array like that?
there are 20 jpg's that are uploaded to the ftp, and for now there isnt even an index.html file
i came to php because i believe it's very secure (even though there's nothing to hide:) it will be good practice
where can i find some code?
thanks!
there are 20 jpg's that are uploaded to the ftp, and for now there isnt even an index.html file
i came to php because i believe it's very secure (even though there's nothing to hide:) it will be good practice
where can i find some code?
thanks!
Re: Hello coders all over the world
Well, since you're a beginner, take a look at this for example:
http://sourceforge.net/project/screensh ... _id=234581
Analyze that script, it'll get you some basics about listing directory content, and after that, try to create your own, and in a different way.
Feel free to ask any advise!
http://sourceforge.net/project/screensh ... _id=234581
Analyze that script, it'll get you some basics about listing directory content, and after that, try to create your own, and in a different way.
Feel free to ask any advise!
Re: Hello coders all over the world
Sorry about that.. I just downloaded thsi script to see what it's like.. It's a real MESS!
All variables are like $a $b $c $f $x..
If you still havn't solved this one, please ask for more info
All variables are like $a $b $c $f $x..
If you still havn't solved this one, please ask for more info
Re: Hello coders all over the world
Code: Select all
<?php
$Files = glob('*.jpg');
foreach($Files as $File){
echo $File . '<br/>' . PHP_EOL;
}