This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

XHTML Problems
#1

Hi,

brilliant script btw should be a perfect addition so thank you very much.

Site is currently in the design stages and I'm using xammp, installation was a breeze, I've completed everything in the initial setup, added a page to the manage page menu.

http://localhost/essexmillers/frederick-...ments.html

I've added the code to the top of the page;

Code:
<?php
session_start();
ob_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

And the code where the comments will show;

Code:
<div id="articletext">

<?php
$page_id = "1";
$path_to_comments_folder = "comments/";
define ('IN_COMMENTICS', 'true'); //no need to edit this line
require $path_to_comments_folder . "includes/commentics.php"; //no need to edit this line
?>
                    </div>
        
              <div class="discuss">
              <h2>Thanks!</h2>

Script is located in root/comments and still it isn't working, just don't get it, it should work but doesn't


Attached Files Thumbnail(s)
   
Reply
#2

The problem is probably that the comments folder is several directories higher than the file. So, for example, if it's in "http://localhost/comments", then
PHP Code:
<?php 
$path_to_comments_folder
= "comments/";
should be
PHP Code:
<?php 
$path_to_comments_folder
= "../comments/";
Which makes it search one directory higher.

I'm giving you three guesses...
Reply
#3

(25-Aug-2010, 12:35 AM)Static Wrote:  The problem is probably that the comments folder is several directories higher than the file. So, for example, if it's in "http://localhost/comments", then
PHP Code:
<?php 
$path_to_comments_folder
= "comments/";
should be
PHP Code:
<?php 
$path_to_comments_folder
= "../comments/";
Which makes it search one directory higher.
hi Static, thanks for responding mate.

I've tried every conceivable combination and nothing works, it doesn't make sense, it's like php isn't working on the page I tried adding some test php to see if its working and nothing is displayed, which is weird because I managed to setup Commentex so php must be working!??

Huh

Lee
Reply
#4

Quote:http://localhost/essexmillers/frederick-...r-comments.html

The script can't be added to a HTML file. It needs to be PHP.

Have you completed the interview?
Reply
#5

Steven,

Ah that probably explains it then! lol

Disappointing all the same, not entirely sure how I'll be able to combat this, back to the drawing board I think! Great script by the way and well maintained I used to run an open source site myself so I know how thankless a task it can be, keep up the good work.

Lee

Reply
#6

You can try to mask your php files as html ones. Look it up on Google, you'll find something.

I'm giving you three guesses...
Reply
#7

(25-Aug-2010, 01:38 PM)Static Wrote:  You can try to mask your php files as html ones. Look it up on Google, you'll find something.

Static,

at the expense of sounding rude mate ''your the dog's bollocks''!! Thats a UK expression indicating your more than ''bloody awesome'', great tip, worked straight away, just created an .htaccess file in the root folder and it solved it straight away.

Code:
# Make all PHP code look like HTML
AddType application/x-httpd-php .htm .html

Cheers,

Big Grin

Lee
Reply
#8

Glad I could help Smile
If you ever need help with anything else, I'll be glad to help.

I'm giving you three guesses...
Reply
#9

You may live to regret that Static, I going to be restyling soon lol, I'll try to find what I need in the Commentics files, but if I get stuck I'll let you know, thanks for the offer though Big Grin

Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by Steven
23-Feb-2014, 06:13 PM
Last Post by jegranet
13-Sep-2013, 09:31 PM
Last Post by franco66
26-Apr-2012, 11:46 AM
Last Post by ichole
29-Sep-2011, 02:17 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)