help?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
Takuma
Forum Regular
Posts: 931
Joined: Sun Aug 04, 2002 10:24 am
Location: UK
Contact:

Post by Takuma »

Coca-Bear
Forum Newbie
Posts: 16
Joined: Wed Sep 18, 2002 9:55 pm
Location: SA
Contact:

Post by Coca-Bear »

THANK YOU :P

chdir(); :P

Coca-Bear
User avatar
Takuma
Forum Regular
Posts: 931
Joined: Sun Aug 04, 2002 10:24 am
Location: UK
Contact:

Post by Takuma »

:D You're welcome
Coca-Bear
Forum Newbie
Posts: 16
Joined: Wed Sep 18, 2002 9:55 pm
Location: SA
Contact:

Post by Coca-Bear »

ok another question :p

how do i execute an php file within a html file. so when i go to http://www.blahblah.com/index.html it will excute a php file.

Also is it possible to show when i a file was uploaded? if so how?

Thanks

Coca-Bear
User avatar
~J~R~R
Forum Newbie
Posts: 20
Joined: Wed Sep 18, 2002 12:19 pm
Location: Amsterdam, the Netherlanda

Post by ~J~R~R »

Question 1: If you have apache, edit httpd.conf and add .htm and .html to the PHP module
Question 2: You could do that with filemtime
Coca-Bear
Forum Newbie
Posts: 16
Joined: Wed Sep 18, 2002 9:55 pm
Location: SA
Contact:

Post by Coca-Bear »

1. i'm using a webhoster. so i dont know if they have apache.
2. i have tried using filemtime but it doesn't tell me the date it was modified just a bunch of numbers.

a.jpg was last modified on 854652

Thanks

Coca-Bear
User avatar
Takuma
Forum Regular
Posts: 931
Joined: Sun Aug 04, 2002 10:24 am
Location: UK
Contact:

Post by Takuma »

Question 1: If you have SSI supported you could use SSI to execute PHP.
Question 2: filemtime() returns the unix timestamp so you need to format it. Try strftime() function
User avatar
hob_goblin
Forum Regular
Posts: 978
Joined: Sun Apr 28, 2002 9:53 pm
Contact:

Post by hob_goblin »

Coca-Bear
Forum Newbie
Posts: 16
Joined: Wed Sep 18, 2002 9:55 pm
Location: SA
Contact:

Post by Coca-Bear »

1. how would i know if SSI is supported? i checked phpinfo() but nothing was there.

2. i tried using strftime() but i dont really understand what to do..

this is the timestamp i got. 1032444035 how do i go about converting it to a date?

Thanks for the help ppls. i really Appreciate all the help you ppls are giving me.

Coca-Bear
User avatar
Takuma
Forum Regular
Posts: 931
Joined: Sun Aug 04, 2002 10:24 am
Location: UK
Contact:

Post by Takuma »

SSI isn't PHP, it is server side include. Search for google. If your host saids it has SSI it should work.

If you want to format the date to "MM/DD/YYYY". Then use this code

Code: Select all

<?php
echo date("m/d/Y",filemtime("FILENAME"));
?>
Coca-Bear
Forum Newbie
Posts: 16
Joined: Wed Sep 18, 2002 9:55 pm
Location: SA
Contact:

Post by Coca-Bear »

ok i will search google for it and learn what i can :p

thanks for the help. it worked.

Coca-Bear
Post Reply