justsomeguy Posted February 26, 2007 Share Posted February 26, 2007 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. Link to comment Share on other sites More sharing options...
boen_robot Posted February 26, 2007 Share Posted February 26, 2007 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". Link to comment Share on other sites More sharing options...
justsomeguy Posted February 26, 2007 Share Posted February 26, 2007 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. Link to comment Share on other sites More sharing options...
vchris Posted February 27, 2007 Author Share Posted February 27, 2007 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. Link to comment Share on other sites More sharing options...
ste Posted February 27, 2007 Share Posted February 27, 2007 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 Link to comment Share on other sites More sharing options...
vchris Posted February 27, 2007 Author Share Posted February 27, 2007 winsocket.com Link to comment Share on other sites More sharing options...
aspnetguy Posted February 27, 2007 Share Posted February 27, 2007 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. Link to comment Share on other sites More sharing options...
vchris Posted February 27, 2007 Author Share Posted February 27, 2007 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. Link to comment Share on other sites More sharing options...
justsomeguy Posted February 27, 2007 Share Posted February 27, 2007 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. Link to comment Share on other sites More sharing options...
asho101 Posted March 5, 2007 Share Posted March 5, 2007 What about www.codemaster.com? Link to comment Share on other sites More sharing options...
aspnetguy Posted March 5, 2007 Share Posted March 5, 2007 what about it? Besides they're shutting down the end of this month!?! Link to comment Share on other sites More sharing options...
vchris Posted April 9, 2007 Author Share Posted April 9, 2007 My site is currently online! http://www.vchris.net Link to comment Share on other sites More sharing options...
Skemcin Posted April 9, 2007 Share Posted April 9, 2007 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. Link to comment Share on other sites More sharing options...
vchris Posted August 22, 2007 Author Share Posted August 22, 2007 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. Link to comment Share on other sites More sharing options...
aspnetguy Posted August 22, 2007 Share Posted August 22, 2007 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;} Link to comment Share on other sites More sharing options...
vchris Posted August 22, 2007 Author Share Posted August 22, 2007 wow I feel dumb right now Link to comment Share on other sites More sharing options...
vchris Posted August 22, 2007 Author Share Posted August 22, 2007 Anyone know where I can find some small icons for home, about, portfolio and contact? I need something clean and only 1 colour. Link to comment Share on other sites More sharing options...
MrAdam Posted August 22, 2007 Share Posted August 22, 2007 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? Link to comment Share on other sites More sharing options...
vchris Posted August 22, 2007 Author Share Posted August 22, 2007 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. Link to comment Share on other sites More sharing options...
vchris Posted August 23, 2007 Author Share Posted August 23, 2007 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? Link to comment Share on other sites More sharing options...
MrAdam Posted August 23, 2007 Share Posted August 23, 2007 the one shown on your portfolio now, with the big planet image.. Link to comment Share on other sites More sharing options...
vchris Posted August 23, 2007 Author Share Posted August 23, 2007 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. Link to comment Share on other sites More sharing options...
MrAdam Posted August 23, 2007 Share Posted August 23, 2007 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? Link to comment Share on other sites More sharing options...
vchris Posted August 23, 2007 Author Share Posted August 23, 2007 Well it's not like I'm using them for profit or anything... Link to comment Share on other sites More sharing options...
MrAdam Posted August 23, 2007 Share Posted August 23, 2007 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 .. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now