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
bironeb
Forum Commoner
Posts: 59 Joined: Thu Nov 20, 2003 12:02 pm
Post
by bironeb » Mon Nov 24, 2003 9:44 am
Well i replaced my case.php code with:
Code: Select all
<?php
if (file_exists("\includes" . $mlink . ".php")) {
include("includes" . $mlink . ".php");
}
?>
and i get this error
Parse error: parse error in c:\apache\htdocs\includes\case.php on line 3
Weirdan
Moderator
Posts: 5978 Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine
Post
by Weirdan » Mon Nov 24, 2003 10:02 am
You do not escape things properly. Try:
Code: Select all
if (file_exists("includes" . basename($mlink) . ".php")) {
include("includes" . basename($mlink) . ".php");
}
bironeb
Forum Commoner
Posts: 59 Joined: Thu Nov 20, 2003 12:02 pm
Post
by bironeb » Mon Nov 24, 2003 10:11 am
Cool Weirdan, That worked...
what do you mean by:
You do not escape things properly.
Im still a PhP Newbie, but i really appreciate all the help.
Weirdan
Moderator
Posts: 5978 Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine
Post
by Weirdan » Mon Nov 24, 2003 10:33 am
bironeb
Forum Commoner
Posts: 59 Joined: Thu Nov 20, 2003 12:02 pm
Post
by bironeb » Mon Nov 24, 2003 10:47 am
Thanks again Wierdan, and all who contributed!