View Single Post
Old 11-06-2004, 11:09 PM   #1 (permalink)
arch13
Loves my girl in thongs
 
arch13's Avatar
 
Location: North of Mexico, South of Canada
[PHP] web content variable & extensions

I have a variable code block used for calling content into my tables (I swear one day I'll get around to laying things out only using css). This variable code specifies that the extension called is a .php file. IE, main.php which is text is called into a table on index.php and inherits the css of index.php.

I want to add .jpg to the list of acceptable extensions.
The code currently reads:
Code:
$ext = ".php";
$id = "".$id."".$ext."";
if (file_exists($id))
{
include($id);
} else {
include("main.php");
}
I meagerly patched that together 2 years ago using a book as a guide. How would I add .jpg to the first line?
Is the correct syntax:
Code:
$ext = ".php",".jpg";
__________________
Seen on an employer evaluation:

"The wheel is turning but the hamsters dead"
____________________________
Is arch13 really a porn diety ? find out after the film at 11.
-Nanofever
arch13 is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37