Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 PHP Coding Difficulties 2
Index -> Web Design
Goto page Previous  1, 2, 3  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
mario64mario




PostPosted: Wed Jul 23, 2008 3:20 pm   Post subject: Re: PHP Coding Difficulties 2

I know about extensions, thanks.

What I meant by the file name, is becuase as long as the original 'bgpixel.png' exists in the FTP, it will display on the site, even though I haven't called upon it in my code.
Sponsor
Sponsor
Sponsor
sponsor
DemonWasp




PostPosted: Thu Jul 24, 2008 8:06 am   Post subject: RE:PHP Coding Difficulties 2

Have you made sure that you've uploaded your new source? Images will not show up in a webpage unless you explicitly tell them to, so I'm guessing your old code is what you're seeing on the page, rather than your new code.
jeffgreco13




PostPosted: Thu Jul 24, 2008 8:32 am   Post subject: Re: PHP Coding Difficulties 2

You can have about 1002345506 pictures on your FTP in the same directory as your HTML or PHP pages and unless they are called upon you will NOT see them displayed on your page.

Maybe you arent overwriting your source like DemonWasp said or maybe you have a little disaster going on in your code where that you're calling pictures (<img> <body background> or whatever).
mario64mario




PostPosted: Thu Jul 24, 2008 10:21 am   Post subject: Re: PHP Coding Difficulties 2

The only image I'm calling upon in my code is 'banner.png', and all of my previous code has been deleted.
DemonWasp




PostPosted: Thu Jul 24, 2008 10:29 am   Post subject: RE:PHP Coding Difficulties 2

Do you have a URL you can point us to, so we can see things for ourselves?
mario64mario




PostPosted: Thu Jul 24, 2008 3:25 pm   Post subject: Re: PHP Coding Difficulties 2

URL to what? The site? http://smb.zeldaoracles.net
Zeroth




PostPosted: Thu Jul 24, 2008 3:36 pm   Post subject: Re: PHP Coding Difficulties 2

... where is the index.htm, or index.html?
mario64mario




PostPosted: Thu Jul 24, 2008 6:23 pm   Post subject: Re: PHP Coding Difficulties 2

http://smb.zeldaoracles.net/wp-content/themes/tlom1/index.php
Sponsor
Sponsor
Sponsor
sponsor
Zeroth




PostPosted: Fri Jul 25, 2008 12:40 am   Post subject: Re: PHP Coding Difficulties 2

I don't think you understand...

when I go to smb.zeldaoracles.net, the web server, which looks like, from the response header, to be Apache 1.3.4(outdated btw, with severe security flaws iirc), will look for an index.* in the root directory of the web visible section of the disk. Typically on a *nix-style server, that is /var/www/.

You can tell your webserver to serve a specific file, but thats a bit beyond my abilities. What I see, thanks to the magic of Firebug... that your server responds with a blank page. A page needs to be served at the root, in some way, to tie it all together. You can't link directly to an index.php in a wordpress theme folder. The index.php needs to be called within an "enviroment" which certain variables exist. The root wordpress page should do this for you. It looks like the wordpress install was bungled, but I could be mistaken.
DemonWasp




PostPosted: Fri Jul 25, 2008 8:11 am   Post subject: RE:PHP Coding Difficulties 2

I'm getting a big ol' PHP failure when I visit your extended URL there. Did you actually make sure you can see the page?
jeffgreco13




PostPosted: Fri Jul 25, 2008 8:49 am   Post subject: Re: PHP Coding Difficulties 2

I too am getting a large error. Multiple ones actually. Ok enough tip-toeing if you need help post your entire code.

Stylesheets, PHP and HTML. And use code tags

I don't need to tell you but there's a good chance that a small error in the PHP can throw off your HTML and CSS.
mario64mario




PostPosted: Fri Jul 25, 2008 9:11 am   Post subject: Re: PHP Coding Difficulties 2

Style.css
code:

body {
margin: 0px;
padding: 0px;
text-align: center;
}

td.menu {
border-width: 1px;
border-top: 0px;
border-style: solid;
border-color: #000;
}

td.content {
border-width: 1px;
border-top: 0px;
border-style: solid;
border-color: #000;
}


Index.php
code:

<?php include("layout/top.php"); ?>
Content
<?php include("layout/bottom.php"); ?>



Top.php (header)

code:

<html>
<head>
<link href="style.css" rel="stylesheet" type="text/css" />
<title>test Page
</head>
<body>
<img src=layout/banner.png><center>
<tr><td class=content>



Bottom.php (footer)

code:

</table>
</body>
</html>



The reason you're getting errors on index.php is becuase it's not recognising or it can't find the files top.php and bottom.php. I'm debating whether I should put them in the theme's folder or not. Turing usually requires all files called upon to be in the same folder, but this is the internet. >.>
octopi




PostPosted: Fri Jul 25, 2008 9:36 am   Post subject: Re: PHP Coding Difficulties 2

http://manage.magnify.ca/htaccess.zip

Put the file contained inside this zip into your main folder, it will ensure that php errors are on, so you'll see what your problems might be.
Zeroth




PostPosted: Fri Jul 25, 2008 9:41 am   Post subject: Re: PHP Coding Difficulties 2

well, index.php, accessed through that extended url, will look in http://smb.zeldaoracles.net/wp-content/themes/tlom1/layout/ for top.php and bottom.php. If however, its supposed to be this... http://smb.zeldaoracles.net/layout/top.php
and http://smb.zeldaoracles.net/layout/bottom.php which does in fact give the pages you wanted, then you need to link to /layout/<name>.php
Zeroth




PostPosted: Fri Jul 25, 2008 9:43 am   Post subject: Re: PHP Coding Difficulties 2

Oh, and good HTML practices is to do src="/layout/banner.png". You've been accessing non-existent files the whole time.
Display posts from previous:   
   Index -> Web Design
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 2 of 3  [ 33 Posts ]
Goto page Previous  1, 2, 3  Next
Jump to:   


Style:  
Search: