rofl90 Posted February 12, 2008 Share Posted February 12, 2008 Is it still possible to use something like <?php include ("http://www.codeetech.com/go/sidebar/"); ?> As thats what i'm trying and I'm receiving a gazillion errors. Quote Link to comment https://forums.phpfreaks.com/topic/90744-is-it-a-newer-version-of-php-or-something/ Share on other sites More sharing options...
GameYin Posted February 12, 2008 Share Posted February 12, 2008 Well don't write the URL like you did, but you could do something like this: <?php include 'http://www.codeetech.com/go/sidebar/'; ?> Also you could remove the absolute link. So something like this also instead of the http: '../go/sidebar/'; //This next part is copied from PHP.net to help you: <?php /* This example assumes that www.example.com is configured to parse .php * files and not .txt files. Also, 'Works' here means that the variables * $foo and $bar are available within the included file. */ // Won't work; file.txt wasn't handled by www.example.com as PHP include 'http://www.example.com/file.txt?foo=1&bar=2'; ?> Quote Link to comment https://forums.phpfreaks.com/topic/90744-is-it-a-newer-version-of-php-or-something/#findComment-465154 Share on other sites More sharing options...
wildteen88 Posted February 12, 2008 Share Posted February 12, 2008 PHP5.2.x (or 5.1.x can remember which) introduced a new PHP directive called allow_url_include. By default this is disabled by default for security reasons. This may be why your include is not working. You should use file_get_contents instead rather than include. If you're getting external html content from a remote site. Quote Link to comment https://forums.phpfreaks.com/topic/90744-is-it-a-newer-version-of-php-or-something/#findComment-465155 Share on other sites More sharing options...
haku Posted February 12, 2008 Share Posted February 12, 2008 I think its because you are trying to include a folder, not a file. Add a file name to the end of that URL. Quote Link to comment https://forums.phpfreaks.com/topic/90744-is-it-a-newer-version-of-php-or-something/#findComment-465157 Share on other sites More sharing options...
rofl90 Posted February 12, 2008 Author Share Posted February 12, 2008 I'm trying to recieve the content of http://www.codeetech.com/go/sidebar/index.php for each page eg http://www.codeetech.com/go/about , I'll try your suggested methods, also CC http://www.codeetech.com/ Quote Link to comment https://forums.phpfreaks.com/topic/90744-is-it-a-newer-version-of-php-or-something/#findComment-465159 Share on other sites More sharing options...
wildteen88 Posted February 12, 2008 Share Posted February 12, 2008 I'm trying to recieve the content of http://www.codeetech.com/go/sidebar/index.php for each page eg http://www.codeetech.com/go/about , I'll try your suggested methods, also CC http://www.codeetech.com/ Read my post above! Quote Link to comment https://forums.phpfreaks.com/topic/90744-is-it-a-newer-version-of-php-or-something/#findComment-465160 Share on other sites More sharing options...
rofl90 Posted February 12, 2008 Author Share Posted February 12, 2008 Hmm now it all works. Umm.. go you guys ))))))))) very happy, i work on it for 6 hours you guys in 10 seconds. unfair? Quote Link to comment https://forums.phpfreaks.com/topic/90744-is-it-a-newer-version-of-php-or-something/#findComment-465172 Share on other sites More sharing options...
wildteen88 Posted February 12, 2008 Share Posted February 12, 2008 If you are including a file via the http:// protocol then no PHP source code will be included in your script. Only the output of the remote php script will be included which will be text/html Quote Link to comment https://forums.phpfreaks.com/topic/90744-is-it-a-newer-version-of-php-or-something/#findComment-465177 Share on other sites More sharing options...
rofl90 Posted February 12, 2008 Author Share Posted February 12, 2008 Okie dokie, I'm having this strange problem.. I can't get it to center now :S check it out... Quote Link to comment https://forums.phpfreaks.com/topic/90744-is-it-a-newer-version-of-php-or-something/#findComment-465182 Share on other sites More sharing options...
rofl90 Posted February 12, 2008 Author Share Posted February 12, 2008 Gahh.. driving me mad, is it possibly a css override heres global.css and index.php @charset "utf-8"; body { background: #F7F7F7; margin-top: 0px; margin-bottom: 25px; } .wrapper { width: 750px; margin: 0 auto; background: #FFFFFF; overflow: hidden; border-left: 4px #EEEEEE solid; border-right: 4px #EEEEEE solid; border-bottom: 4px #EEEEEE solid; left: 50%; } .wrapper-indent { width: 720px; margin: 15px; overflow: hidden; } /* HEADER */ #header { width: 100%; background: #FFFFFF; overflow: hidden; margin-bottom: 20px; } #header-inner { width: 720px; margin: 0 auto; } .logo { float: left; } .slogan { float: right; margin-top: 5px; border-left: 8px #EEEEEE solid; } .slogan-inner { font: 15px "Trebuchet MS"; color: #E2E2E2; font-weight: bold; margin-top: 15px; margin-bottom: 15px; margin-right: 0px; margin-left: 50px; } .slogan-inner a { font: 15px "Trebuchet MS"; font-weight: bold; } .slogan-inner a:link { color: #E2E2E2; text-decoration: none; } .slogan-inner a:visited { color: #E2E2E2; text-decoration: none; } .slogan-inner a:hover { color: #81D1FF; text-decoration: none; } .slogan-inner .active { color: #FF018D; text-decoration: line-through; } /* BREADCRUMB */ .breadcrumb { margin-bottom: 20px; background: #F2F7C9; border-top: 1px dotted #D2E639; border-bottom: 1px dotted #D2E639; padding: 5px; color: #999999; font: 15px "Trebuchet MS"; font-weight: bold; } .breadcrumb .home { color: #999999; font-weight: bold; } .breadcrumb .linkimg { margin-bottom: -3px; } .breadcrumb a { color: #999999; font-weight: bold; text-decoration: none; } .breadcrumb a:hover { color: #333333; text-decoration: none; } /* NAVIGATION */ #navbar { width: 100%; background: #FFFFFF url('../images/navbarbg.gif') repeat-x top left; overflow: hidden; height: 43px; } #nav { width: 720px; margin: 0 auto; } .nav-link { width: 144px; float: left; } .nav-link a { color: #989898; display: block; padding: 10px 0px; text-align: center; font: 13px "Trebuchet MS"; font-weight: bold; } .nav-link a:link { background-color: #FFFFFF; color: #989898; border-top: 4px #81D1FF solid; text-decoration: none; } .nav-link a:visited { background-color: #FFFFFF; color: #989898; border-top: 4px #81D1FF solid; text-decoration: none; } .nav-link .active { background-color: #FFFFFF; color: #989898; border-top: 4px #D2E639 solid; text-decoration: none; } .nav-link a:hover { background-color: #FFFFFF; border-top: 4px #FF018D solid; color: #DDDDDD; } /* CONTENT */ .content { width: 720px; overflow: hidden; } .left { float: left; width: 480px; border-right: 1px #EEEEEE solid; } .left-indent { margin-right: 15px; width: 441px; font: 13px "Trebuchet MS"; color: #999999; text-align: justify; } a { color: #999999; font-weight: bold; text-decoration: none; } a:link { color: #999999; font-weight: bold; text-decoration: none; } a:visited { color: #999999; font-weight: bold; text-decoration: none; } a:hover { color: #999999; font-weight: bold; text-decoration: underline; } p { border-left: 4px #EEEEEE solid; margin-left: 5px; font-style: italic; padding: 15px; } h1 { font: 20px Arial; color: #81D1FF; font-weight: bold; margin-bottom: 4px; } h1 span { color: #CCCCCC; } h2 { font: 20px Arial; color: #D2E639; font-weight: bold; margin-bottom: 4px; } h2 span { color: #CCCCCC; } h3 { font: 20px Arial; color: #FF018D; font-weight: bold; margin-bottom: 4px; } h3 span { color: #CCCCCC; } h4 { font: 14px Arial; color: #CCCCCC; font-weight: bold; margin-bottom: 4px; } h4 span { color: #E2E2E2; } h5 { font: 16px Arial; color: #CCCCCC; font-weight: bold; margin-bottom: 4px; } h5 span { color: #E2E2E2; } .left-indent .img-port { border: 3px #EEEEEE solid; margin: 0 auto; } .left-indent .imgm { margin: 15px; } .right { float: right; width: 223px; } /* SUB NAV */ .subnav-title { background: #FFFFFF; border-top: 1px dotted #EEEEEE; border-bottom: 1px dotted #EEEEEE; padding: 5px; color: #999999; font: 15px "Trebuchet MS"; font-weight: bold; } .subnav-link a { color: #CFCFCF; display: block; padding: 5px; padding-left: 30px; text-align: left; font: 13px "Trebuchet MS"; font-weight: bold; } .subnav-link a:link { background-color: #F9F9F9; background-image: url('../images/subnav.gif'); background-position: top left; background-repeat: no-repeat; border-bottom: 1px #EEEEEE solid; color: #CFCFCF; text-decoration: none; } .subnav-link a:visited { background-color: #F9F9F9; background-image: url('../images/subnav.gif'); background-position: top left; background-repeat: no-repeat; border-bottom: 1px #EEEEEE solid; color: #CFCFCF; text-decoration: none; } .subnav-link a:hover { background-color: #FFFFFF; background-image: url('../images/subnav.gif'); background-position: bottom left; background-repeat: no-repeat; border-bottom: 1px #EEEEEE solid; color: #CFCFCF; } /* LATEST CLIENT */ .latest-client { margin-top: 15px; } .latest-title { background: #F2F7C9; border-top: 1px dotted #D2E639; border-bottom: 1px dotted #D2E639; padding: 5px; color: #999999; font: 15px "Trebuchet MS"; font-weight: bold; } /* CLIENTS */ .clients { width: 440px; overflow: hidden; display: block; } .clientbox { width: 220px; height: 220px; text-align: center; float: left; } .clientbox a { background: #FFFFFF url('../images/clientbox.gif') no-repeat top left; width: 220px; height: 220px; margin: 0 auto; overflow: hidden; display: block; } .clientbox a:link { background: #FFFFFF url('../images/clientbox.gif') no-repeat top left; width: 220px; height: 220px; margin: 0 auto; overflow: hidden; display: block; } .clientbox a:visited { background: #FFFFFF url('../images/clientbox.gif') no-repeat top left; width: 220px; height: 220px; margin: 0 auto; overflow: hidden; display: block; } .clientbox a:hover { background: #FFFFFF url('../images/clientbox.gif') no-repeat bottom left; width: 220px; height: 220px; margin: 0 auto; overflow: hidden; display: block; } .clientimage { width: 190px; height: 190px; margin: 15px; } /* IDENTITY */ .ids { width: 440px; overflow: hidden; display: block; } .idbox { width: 110px; height: 110px; text-align: center; float: left; } .idbox a { background: #FFFFFF url('../images/idbox.gif') no-repeat top left; width: 110px; height: 110px; margin: 0 auto; overflow: hidden; display: block; } .idbox a:link { background: #FFFFFF url('../images/idbox.gif') no-repeat top left; width: 110px; height: 110px; margin: 0 auto; overflow: hidden; display: block; } .idbox a:visited { background: #FFFFFF url('../images/idbox.gif') no-repeat top left; width: 110px; height: 110px; margin: 0 auto; overflow: hidden; display: block; } .idbox a:hover { background: #FFFFFF url('../images/idbox.gif') no-repeat bottom left; width: 110px; height: 110px; margin: 0 auto; overflow: hidden; display: block; } .idimage { width: 94px; height: 94px; margin: 8px; } /* PORTFOLIO IMAGES */ .portimage { width: 410px; overflow: hidden; margin: 0 auto; } .portimage a { background-position: top left; } .portimage a:link { background-position: top left; } .portimage a:visited { background-position: top left; } .portimage a:hover { background-position: bottom right; } .portimgtop { background: #FFFFFF url('../images/portimgtop.gif') no-repeat top left; width: 410px; height: 15px; margin: 0 auto; } .portimgspa { background: #FFFFFF url('../images/portimgspa.gif') repeat-y top left; width: 410px; overflow: hidden; margin: 0 auto; } .portimg { margin-left: 15px; margin-right: 15px; } .portimgbot { background: #FFFFFF url('../images/portimgbot.gif') no-repeat top left; width: 410px; height: 15px; overflow: hidden; margin: 0 auto; } /* FORM */ .textbox { font: 15px "Trebuchet MS"; color: #999999; font-weight: bolder; padding: 4px; letter-spacing: 0pt; background: #FFFFFF none repeat scroll 0%; border-color: #E2E2E2; border-style: solid; border-width: 2px 1px 1px; width: 98%; } .textarea { font: 15px "Trebuchet MS"; color: #999999; font-weight: bolder; padding: 4px; letter-spacing: 0pt; background: #FFFFFF none repeat scroll 0%; border-color: #E2E2E2; border-style: solid; border-width: 2px 1px 1px; width: 98%; } fieldset { border: 1px #EEEEEE solid; padding: 10px; text-align: center; margin-bottom: 10px; margin-top: 0px; } legend { font: 13px "Trebuchet MS"; color: #666666; font-weight: bold; text-align: left; padding: 6px; } .submit { font: 15px "Trebuchet MS"; color: #FFFFFF; font-weight: bolder; padding: 4px; letter-spacing: 0pt; background: #DBDBDB none repeat scroll 0%; border-color: #BBBBBB; border-style: solid; border-width: 2px 1px 1px; width: 98%; } /* POWERED */ .powered { margin-top: 15px; } /* FOOTER */ .footer { border-top: 1px #81D1FF dotted; border-bottom: 1px #81D1FF dotted; background: #EBF8FF; width: 720px; overflow: hidden; margin-top: 20px; } .footer-inner { font: 12px "Trebuchet MS"; color: #81D1FF; overflow: hidden; margin: 10px; } .footer-left { float: left; overflow: hidden; } .footer-right { float: right; overflow: hidden; width: 500px; } /* made by charlie kirk */ and <!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=utf-8" /> <title>Codee - Where design has many meanings</title> <link rel="stylesheet" type="text/css" href="http://www.codeetech.com/go/css/global.css" /> <link rel="stylesheet" href="http://www.codeetech.com/go/css/lightbox.css" type="text/css" media="screen" /> </head> <body> <center> <div class="wrapper"> <div class="wrapper-indent"> <div id="header"> <div id="header-inner"> <div align="center"><a href="#"><img src="go/images/headerimg.gif" alt="" width="200" height="69" border="0" class="logo" title="Go to Homepage!" /></a> </div> <div class="slogan-inner"> <div align="center"> <?php include("go/menu/index.php"); ?> </div> </div> </div> </div> <div class="breadcrumb"> <div align="center"> <?php include($_SERVER['DOCUMENT_ROOT']."/backlinks.php"); ?> </div> </div> <div class="content"> <div class="left"> <h1 align="center"> A little info </h1> <p align="center" class="left-indent">We are an established web firm, specialising in designing high class websites. We have a a great track record showing amazing websites, tailored to perfection for the client. We will do anything we can to go out of our way for the client. You are number one. </p> <p align="center" class="left-indent"> <span class="left-indent"> <?PHP $number = "2"; include("go/news/show_news.php"); ?> </span></p> </div> <div class="right"> <div class="subnav-title"> <div align="center"> <?php include("go/sidebar/index.php"); ?> </div> </div> <div class="latest-client"> <div class="latest-title"> <div align="center">Latest Client</div> </div> <div class="clientbox"> <div align="center"><a href="http://www.codeetech.com/go/clients" class="clientbox"><img height="13" width="1" border="0" src="/go/images/spacer.gif" /><br /> <?php include("go/latestclient/index.php"); ?> </a> </div> </div> </div> </div> </div> </div> <div class="footer"> <div class="footer-inner"> <div align="center"> <?php include("go/footer/inner/index.php"); ?> </div> </div> </div> </div> </div> </div> </div> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/90744-is-it-a-newer-version-of-php-or-something/#findComment-465192 Share on other sites More sharing options...
rofl90 Posted February 12, 2008 Author Share Posted February 12, 2008 bump Quote Link to comment https://forums.phpfreaks.com/topic/90744-is-it-a-newer-version-of-php-or-something/#findComment-465238 Share on other sites More sharing options...
GameYin Posted February 13, 2008 Share Posted February 13, 2008 What isn't being centered? The content under <center>? If so just take that out and <div align="center"> it. Quote Link to comment https://forums.phpfreaks.com/topic/90744-is-it-a-newer-version-of-php-or-something/#findComment-465744 Share on other sites More sharing options...
haku Posted February 13, 2008 Share Posted February 13, 2008 I shudder. Quote Link to comment https://forums.phpfreaks.com/topic/90744-is-it-a-newer-version-of-php-or-something/#findComment-465749 Share on other sites More sharing options...
GameYin Posted February 13, 2008 Share Posted February 13, 2008 I shudder. Huh? Quote Link to comment https://forums.phpfreaks.com/topic/90744-is-it-a-newer-version-of-php-or-something/#findComment-465901 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.