I am trying to add the links to my site via include. Do I have to use the .htaccess if my site is php enabled?
Search the forum for information on how to tell the server to send pages with a .html extention through the php parser using a .htaccess file. NOTE: You probably should have posted this in setup/validation help.
Here is the code I placed at the bottom of my page: <?php ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../'); include ('ad_network.php'); echo $ad_network[0]; - echo $ad_network[1]; - echo $ad_network[2]; - echo $ad_network[3]; - echo $ad_network[4]; ?> Code (markup): I receive this Parse error: parse error, unexpected T_ECHO in on line 55 once the .htaccess is installed? Any suggestoins?
Do you have an xml statement in your page. I noticed that if you set your site to parse php in html and you have <? in your pages it will try and parse all the content as php including stuff like: <?xml version="1.0" encoding='UTF-8'?>
change it too: <?php ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../'); include ('ad_network.php'); echo $ad_network[0]; echo "-"; echo $ad_network[1]; echo "-"; echo $ad_network[2]; echo "-"; echo $ad_network[3]; echo "-"; echo $ad_network[4]; ?> Code (markup): Josh
Or better yet, drop all your echo statements and instead use: echo implode (' - ', $ad_network); PHP:
Thanks for the replies. Shawn your code seems the easiest however I could not get it to work. It seems I am only displaying a couple of the same ads over and over. Could you please try and help me debug this code. An example of the what the code I have is doing check out http://www.mortgagesaver.org/dirs/testing.htm <!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> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <?php ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../'); include ('ad_network.php'); echo $ad_network[0]; echo "-"; echo $ad_network[1]; echo "-"; echo $ad_network[2]; echo "-"; echo $ad_network[3]; echo "-"; echo $ad_network[4]; ?> </body> </html> Code (markup):
For some reason I often get 3 of the same ads http://www.mortgagesaver.org/dirs/testing just add .htm On this site I have ads running on the forums. I just added the coop to my linking directory (which is static html pages). Do I have to create a new account since these links or running on plain html pages?