Jump to content
  • Advertisement
Sign in to follow this  
lordcorm

[web] Can any one mod this?

This topic is 4421 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

can any one mod this so it says the files header not the files name its self?
<?php 
   foreach( glob("*") as $f )
      echo "<ol><p><a href=\"$f\">$f</a></p>";
?>;


Edit by Fruny: added source block. [Edited by - Fruny on August 13, 2006 12:35:17 AM]

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by lordcorm
can any one mod this so it says the files header not the files name its self?
"<?php foreach(glob("*")as$f)echo"

    $f

    ";?>;"


Um, what?? O.o

Edit: The shock value is over. Your code doesn't look complete. What are you trying to accomplish? The above code needs to be expanded or your example needs to be more fulfilling in order to know what the heck you're doing. :)

Share this post


Link to post
Share on other sites
what i need is a scripts that shows when i put a new file into a folder it shows the files header title not the files title and in order.
Thank you!

Share this post


Link to post
Share on other sites
Next time try and use [ code ] or [ source ] blocks...


Here is some code!



Here is some source!

Share this post


Link to post
Share on other sites
Quote:
what i need is a scripts that shows when i put a new file into a folder it shows the files header title not the files title and in order.
Thank you!


What version of PHP are you using? What do you mean by file header title? The file name? The file type?

Sorting the order of the files can easily be done when you have built an array of the files in question; it's matter of knowing exactly what you need. Sorry, I just don't know what file header title is.

Share this post


Link to post
Share on other sites
This is what i meen:
<head><title>Dark Legion</title></head>
So it says the Dark Legion and not the file name darklegion.html and i dont know what version of php it uses but sure it the latest.

Share this post


Link to post
Share on other sites
Quote:
This is what i meen:
<head><title>Dark Legion</title></head>
So it says the Dark Legion and not the file name darklegion.html and i dont know what version of php it uses but sure it the latest.


You have to close the code bracket like you close HTML tags [/ code] (minus the space).

You want to read only HTML files and grab the contents between <title></title>?

To find out your PHP version:

<?php
phpinfo();
?>

Share this post


Link to post
Share on other sites
yes i want it to only grab the name in between the
<title>...</title>
command and make it show a link to it so i can make a thang on my home page that shows the new updated files.
Also make sure that it shows it in numbers 1,2,3,4,etc.......

Share this post


Link to post
Share on other sites
A really lousy way of doing it would be to open the file as a text-file and search for <title> then read until </title> and put it in a variable. Search for reading files with PHP, it isn't too hard to do.

Share this post


Link to post
Share on other sites

This topic is 4421 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!