Author | Post | |||
sniperkid |
ok, this is what i have, it works with pages but it doesn't work with pics any hints on how to get it to work... <?php if ($pic) { include("$pic"); } else { include("pic1.jpg"); } ?> |
|||
14.01.2004 18:57:17 |
|
|||
diskis |
um, don't include try to run the file? how about <?php if ($pic) { echo("<img src=$pic>"); } else { echo("<img src=pic1.jpg>"); } ?> just ripped that out of my ass, as i don't know what you want to be done... --Diskis |
|||
14.01.2004 20:40:14 |
|
|||
sniperkid |
well what i have is links at the bottom like ?pic=pic2.jpg and then when its clicked the picture changes. Thanks btw |
|||
14.01.2004 22:55:32 |
|
|||
DeathSpawn |
Not sure if you can include a non.php file. Never tried it, but doesn't seem like it would work. Why not just JavaScript it in to change on the mouse click? Might be easier. Just my 2¢ DS |
|||
15.01.2004 00:05:30 |
|
|||
TheHiveMind |
Of course you can include (or require) a non-php file... it will just be interpreted as a standard html page. (Which is not entirely correct, what happens is that the php interpretation pauses and the included file is parsed... should this file be / contain a script the server is configured to treat differently (php or whatnot), that will be done). So if you try including some binary file, most likely its content will simply be displayed on the page. |
|||
15.01.2004 00:30:26 |
|