Home N-13 News Forums Help Search
RegisterForgot password?
How to add image to post necklacesdiscou
Known bugs - 4.0.3 necklacesdiscou

Latest N-13 News 4.0.3

What is N-13 News?
Where can I get help?
Known bugs

Forums Help & Support Include not working.
Kbkisan
Posted on 07 Feb 2010, 18:19:14

Access: Member
Total Posts: 3
Joined: 2010-02-07

I'm some what of a noob in PHP, but I managed to install the system with out any problem and the admin interface and the index.php page are working fine, but when I try to include it elsewhere I always get an error.

The system is installed at http://nunadesign.net/news/ and the index.php shows up fine. Then I created a file at http://nunadesign.net/news/testing.php that only contains <?php include 'index.php'; ?> and I always get this error " Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/nunastrax/nunadesign.net/news/testing.php on line 4 "

hope someone can enlighten my.

best regards,
Kbki
#1823
Chris
Posted on 07 Feb 2010, 18:21:28

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

Can you paste all of the code you have in your testing.php file.
#1824
Kbkisan
Posted on 07 Feb 2010, 18:39:05

Access: Member
Total Posts: 3
Joined: 2010-02-07

Hi thanks for a super fast reply.

At the moment I just have this..

<html>
<head></head>
<body>
<?php include 'index.php'; ?>
</body>
</html>
#1825
Chris
Posted on 07 Feb 2010, 19:01:06

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

Strange, not sure why it's giving an error. I would suggest trying these combinations to see if any work.

Code:
<html>
<head></head>
<body>
<?php 
include 'index.php'; 
?>
</body>
</html> 


Code:
<html>
<head></head>
<body>
<?php 
include "index.php";
?>
</body>
</html> 
#1826
Last edited by Chris at 2010-02-07 19:01:54 Reason:
Kbkisan
Posted on 07 Feb 2010, 19:26:00

Access: Member
Total Posts: 3
Joined: 2010-02-07

Hi,

I tried both and they don't work. I'm going to see if I can install it on a new server and test it there, I'm thinking it can be related to that.

Thanks for your help.
#1827
Crumx
Posted on 13 Feb 2010, 12:07:21

Access: Member
Total Posts: 3
Joined: 2010-02-13

This is due to path to config db as well as function is not clearly stated inside the script so you cant just include index.php into another page without any modification to default script.

It would be better if you have a var that can be change for where the news folder located.

Also function list on this news is something that always being used by other script eg: redirect() and much more. You should use more unique name for function else you will have problem to integrate this to some cms.

I do suggest that you can make a fix for this as soon as possible.
#1863
Network-13.com © 2013