Jump to content
vchris

Domain Name

Recommended Posts

A path like /include/... is not absolute, it is relative. It is relative to the domain. An absolute HTTP path would include the protocol and domain:http://domain.com/include/...And an absolute filesystem path would need to start from the drive letter in Windows or the mount point in Linux. Your absolute path is probably something along these lines:/home/username/var/www/...If you want to find out what the path to the script you are executing is, you can print the __FILE__ constant:

echo __FILE__;

It will show the valid path you need to use for filesystem functions.But I've never had to use an absolute path for include files.

Share this post


Link to post
Share on other sites
Thanks Boen I'll contact them. Any idea why html absolute path work but not php?
PHP is executed on the server, so the paths it sees are taken as if the server requested them. HTML is processed on the client, so references in it are taken as seen by the browser.Example: You're on "http://vchris.net/something/" and in the index document there's a reference to "/else/file.jpg". The browser understands that this path is relative to the domain and the absolute path is now "http://vchris.net/else/file.jpg". The same reference, in PHP is resolved to the absolute file path the server sees, which if taken from my previous example would be "D:/my_site/else/file.jpg".

Share this post


Link to post
Share on other sites

The server will not add the "D:/my_site" onto the path if it starts with a slash. A slash tells the web server (not the filesystem) to look for a file relative to the website root directory. If you gave that path to the filesystem, it would not append anything onto the beginning of it. /else/file.jpg is a perfectly valid absolute path in a Linux environment, assuming that there is a directory called "else" in the root level of the current mounted volume, such as a hard drive. In Linux, the root of the drive is not "X:\", it is just "/". The webserver is what knows to append the website root to a filename that starts with a slash, it is not the filesystem or the OS that does that.

Share this post


Link to post
Share on other sites

I got a message back from my web host. If I want to use absolute paths in php I need to use /var/www/html/includes/header_e.php.This web host is awesome. They answer all my question very fast and no problem at all.

Share this post


Link to post
Share on other sites

who are you hosting with vchris? (sorry if you mentioned earlier but there is 8 pages in this topic)im looking into moving webhost i had been considering the "Code Monster" plan at dreamhost

Share this post


Link to post
Share on other sites

they look like a pretty good host. Do they let you host more than one site per account (ie. have 3 domains go to 3 diffrent sites on same account) or better yet can you manage your own DNS? I couldn't find the answers on their site, thought you might know since you use them.

Share this post


Link to post
Share on other sites

You should contact them about your first question since I have no idea. I don't see any options for my DNS so I guess I can't manage it. Email them, they reply pretty fast usually.

Share this post


Link to post
Share on other sites

It's crazy how much disk space is starting to be available for hosting. I remember when hosting plans were 10-50MB, the level 1 Dreamhost plan is 172 GB. Just out of curiosity, why would you go with the level 3 plan there? Unless 3000 email accounts are too constraining, or you plan to host more then 172 GB of files, it seems like all you need is the level 1 plan. I have a plan for some of my sites through geekhosting, which gives you cPanel, and I think I'm only getting 700MB, but I'm not in any danger of running out of space.For DNS, I like using 000domains.com. I register my domains there, and I can control all of the DNS stuff, down to adding NS, MX, CNAME, A, and TXT records. A company I work for also has a server from ev1servers.net, which apparently is now called The Planet, or I guess was bought out by them. We can do anything we want on that server, even down to shipping them hardware to install or logging into cPanel and rebooting the machine. They also have a great network, their servers are in 6 datacenters on a 100GB/sec network, and is the second largest dedicated server host after IBM. Their list of servers available is here:http://www.theplanet.com/selfmanaged_servers/allproducts.aspThat is the kind of thing someone would need if they are going to host a multiplayer game or something like that. We use ours to run several database-driven internal applications for several major international clients, and we've never had reports of poor service with that server.

Share this post


Link to post
Share on other sites

Congrats, I really like your design.I think your homepage could have a welcoming message - left side in english and the right side in french. :)

Share this post


Link to post
Share on other sites

I've got a few minor changes in mind for the website. I might add a welcoming message. Is there a way when printing my page to remove the images (top banner and nav)? I was thinking of adding icons of all the software I know on the about page but I'm not sure about the programming languages I know... There's no icon for HTML. I don't really like those huge thumbnails on the portfolio page.If anyone has any suggestions, let me know.

Share this post


Link to post
Share on other sites

create a new stylesheet for print

<link rel="stylesheet" media="print" href="print.css" type="text/css" />

Then you can do this

img{  display: none;}

Share this post


Link to post
Share on other sites

wow I feel dumb right now :)

Share this post


Link to post
Share on other sites

Anyone know where I can find some small icons for home, about, portfolio and contact? I need something clean and only 1 colour.

Share this post


Link to post
Share on other sites

vchris do you create the graphics for your websites? .. namely the "deep coding" portfolio? I was just wondering because it's bloody good .. thought perhaps you might know a website offering free graphics or something?

Share this post


Link to post
Share on other sites
vchris do you create the graphics for your websites? .. namely the "deep coding" portfolio? I was just wondering because it's bloody good .. thought perhaps you might know a website offering free graphics or something?
I have many versions of the deep coding site. It was the name of my portfolio before vchris.net. Which one are you referring to? deviantart.com is a great site for art.

Share this post


Link to post
Share on other sites

How do you guys like this http://vchris.net/portfolio/portfoliotest_e.php compared to this http://vchris.net/portfolio/portfolio_e.phpand this http://vchris.net/home/test_e.php compared to http://vchris.net/home/and how would I add the media print for the css when I include css this way:<style type="text/css">@import url('/css/vchris.css');@import url('/css/slimbox.css');</style>I would need another <style> tag right?

Share this post


Link to post
Share on other sites
the one shown on your portfolio now, with the big planet image..
Well both deep coding websites have a big planet but I'm guessing you're talking about the one where it says Deep Coding right underneath the planet. That one it's just an image I took from deviantArt I think and just erased the bottom of it for my content. The Second Deep Coding website (blue), I made from scratch.

Share this post


Link to post
Share on other sites

ah right, and yeah i meant that one. I didnt notice there was another version on your portfolio with a planet on till just a minute ago..Is it perfectly legal to take images from deviant art then?

Share this post


Link to post
Share on other sites

Well it's not like I'm using them for profit or anything...

Share this post


Link to post
Share on other sites

ah right .. i dont know the rules around it .. im not diggin at you or owt.. i was thinking more for myself .. always seem to struggle with that kind of thing ..

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...