Ritz

Ritz

Joined
Sep 02, 2010

Activity Stream

Ritz commented on a Page, Dynamic Title and Meta Tags  -  Sep 07, 2010

correct it's for directory. when i include directory in meta_txt it works perfect. but I don't know how to stript the directory in get_meta.php.

what about meta information disapeearing http://www.ritzinfotek.in/ not the index.php

 Respond  
Ritz commented on a Page, Dynamic Title and Meta Tags  -  Sep 06, 2010

also I've seen meta informations is appearing properly when there is file name only. See it here:

http://www.ritzinfotek.in/

In this case the meta information has been totally disappeared..

any suggestion..

 Respond  
Ritz commented on a Page, Dynamic Title and Meta Tags  -  Sep 06, 2010

while usiring print_r($data).. getting this

Array ( [0] => index.php [1] => meta title [2] => meta tags [3] => meta description1 )
Array ( [0] => aboutus.php [1] => metal title [2] => meta tags [3] => meta description2 )

and so on.

while echo $page the out is:
directory/index.php

 Respond  
Ritz commented on a Page, Dynamic Title and Meta Tags  -  Sep 05, 2010

yes. it's in the same directory in local server. getting errros like:


Notice: Undefined variable: title in C:\wamp\www\directory\index.php on line 11

 Respond  
Ritz commented on a Page, Dynamic Title and Meta Tags  -  Sep 04, 2010

oh. everything works when it hosted in server. It won't work on my wamp local server..

see it here.. http://www.ritzinfotek.in

 Respond  
Ritz commented on a Page, Dynamic Title and Meta Tags  -  Sep 04, 2010

so I repeated the variable once more time but now the meta is taking but from the las line of database.. :

while($data = fgetcsv($meta_db, 9000, '|'))
{
if($data[0] == $page)
{
$data[1]=$title;
$data[2]=$meta_keywords;
$data[3]=$meta_description;
}
$title = $data[1];
$meta_keywords = $data[2];
$meta_description = $data[3];
}

 Respond  
Ritz commented on a Page, Dynamic Title and Meta Tags  -  Sep 03, 2010

here is the meta_tags.txt

index.php|title 1|meta tags|meta description
aboutus.php|title 2|meta tags|meta description

and the get_meta.php is same what you provided. In index.php i placed the same here it is:

<?php include("get_meta.php"); ?>

<?php print $title; ?>

Thing is the error is undefined variable errors..

This portion is not parsing:

while($data = fgetcsv($meta_db, 9000, '|'))
{
if($data[0] == $page)
{
$title = $data[1];
$meta_keywords = $data[2];
$meta_description = $data[3];
}
}

something is wrong with the braces.. I don't know as I'm a newbie in php.

 Respond  
Ritz commented on a Page, Dynamic Title and Meta Tags  -  Sep 02, 2010

I've used exactly same code you've mentioned above and also replace the file name with index.php. It seems php failed to read the variable $title, $meta_keywords, $meta_descriptions.

 Respond  
Ritz commented on a Page, Dynamic Title and Meta Tags  -  Sep 02, 2010

The script nice.. but it's not working in my server. I'm using wamp php 5.3

Getting errors : "Undefined variable: title in ....

Any help would be much appreciated.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.