Jump to content

geenee

Members
  • Posts

    15
  • Joined

  • Last visited

    Never

Contact Methods

  • Website URL
    http://www.deep-c.co.uk

Profile Information

  • Gender
    Male
  • Location
    UK

geenee's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. No one got any comments?? I dunno whether that's a good or a bad thing...
  2. My bad, had to change it slightly for the client and changed the filename. Here's the link now: http://www.taxivansuk.org/new/TV_09_MAIN_PAGES.jpg
  3. Hi all, Just re-designed an old clients website and wanted to see if anyone had any critiscism of the new site idea before I start developing it. I'm going to develop the site on Drupal 6.9 and use some jQuery animation effects for the banner on the front page for those who are interested. The design is just a flat image at the moment: http://www.taxivansuk.org/new/Version-2.6.jpg All comments appreciated! Thanks
  4. Ok thanks for the help, I've managed to get it working by simply using: echo file_get_contents('http://www.url.com/file.html'); Not sure why include() wasn't getting the remote file... I'm running PHP 5.2.6 for anyone who's interested Thanks again!
  5. I've tried the single and double quotes and it doesn't seem to make any difference. First I tried adding the code to enable error reporting, this didn't do anything, still just nothingness when the code starts. Then I tried the collowing code: $file = "test.html"; file_get_contents($file); This didn't work at all which seems odd (the script just stops when it gets to that bit of code), maybe there's an error in the syntax, I've looked at some examples and followed them. Any more help would be greatly appreciated, thank you
  6. Sorry about the lack of specificness... There's no error messages, the output stops where the included file should be. So the code is being read and when the include statement is read, it just stops. I haven't come across file_get_contents before, I will try to use it and see what happens.
  7. Ok i'm tring to include a file in a page, it's the simplist of things but it's not working... I don't know much PHP so sorry if I'm overlooking something obvious. allow_url_include is set to On by the way the code i've got is: <?php include ("http://www.myurl.com/test.html"); ?> Includes work fine with local files, I've asked someone at my hosting company and they say it should be working fine so I really just dunno what to do Thanks
  8. Ok after a long while looking around I've found some code which works if you put it in the .htaccess file of the public_html of the main domain (which would be domain1.com in the above example). Could anyone tell me how this is actually working? I've fiddled around with it, deleted bits to see what happens but really have no idea why this works... RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} !^/domain2/ RewriteCond %{HTTP_HOST} ^domain2.com$ [OR] RewriteCond %{HTTP_HOST} ^www.domain2.com$ RewriteRule ^(.*)$ domain2/$1 [L]
  9. Hi, firstly apologies if this problem has already been answered or is really simple, I've looked around a lot and can't find a solution. In a nutshell I have domain1.com as my main domain and domain2.com, domain3.com etc - and one hosting account. I'm trying to get them to appear as seperate websites but reside on the same hosting account. I've been using CPanel to try and set this up so far. I can set it up so domain2.com will re-direct to domain1.com/domain2 - or domain2.domain1.com, or even 'mask' domain2.com so it uses the same root directory as domain1.com and all the links appear to be a different web site (e.g www.domain1.com/page2.html and www.domain2.com/page2.html are the same page but appear differently in the address bar). What I want is domain2.com to be a different website to domain1.com, but store the files for domain2.com in a folder (domain1.com/domain2) - so if the user types in www.domain2.com/page2.html they won't get re-directed but the file will be stored here: domain1.com/domain2/page2.html Does this make sense? and is it possible? Looking around I've seen a people referring to cloaking and masking scripts, is this the only - or best way to do this? Here is what is currently in my .htaccess: RewriteEngine on RewriteCond %{HTTP_HOST} ^domain2.com$ [OR] RewriteCond %{HTTP_HOST} ^www.domain2.com$ RewriteRule ^(.*)$ "http\:\/\/www\.domain1\.com\/domain2\/" [R=301,L] The other option I have is to set up seperate hosting accounts for each of my domains, which for various reasons isn't what I'd like to have to do. Thanks!
  10. Ok, there may well be a very simple solution to this problem but I can't think of it so here it is.. I've got several pages on a web site, the first is the index.php the others are index.php?type=1, index.php?type=2 etc... each page lists items and when you click on an item it displays the item's info, the link(s) to display the item's info should be: <a href='{$PHP_SELF}&pid={$row[pid]}'>Item Link</a> this works fine on all the pages apart from index.php, as the link comes out as: index.php&pid=1 whereas it should be index.php?pid=1 What is the simplist way for the script to use ? instead of & if there is no variable already being send through the URL?? Thanks
  11. Great looking web site! Does a good job of selling your product as well, got me interestd! One thing I'd say is I'm not keen on the look of the links on the left hand side, just my opinion but don't think it looks as professional as the rest of the site, maybe use button graphics for them instead. Also maybe a little bit more colour in there wouldn't go a miss, the green is used really well, but for instance the buy now could be brighter to draw the eye to it maybe.
  12. Thanks for the feedback everyone! I definitely did design the site around the code more than the graphics and this is something which I'm going to work on now to make a newer version of the site. That's a very good point about demonstrating more complex scripting and coding on my own web site, and the contact form is something which i have completly overlooked - feel pretty stupid for not putting that in! I'm going to do some re-designing and make some additions now and post up when I've done to see what people think, thanks again
  13. I haven't come across heredoc much in scripts, I wonder what the advantages of it are? At the moment I'm using method 1, which is proving to be a bit annoying typing echo all the time, but then again closing php will mean displaying varibles takes longer to code, which doesn't matter if theres you haven't got many to display, but when some bits of your code have and some haven't it's a bit of a prediciment. Switching between the two methods is one option but I'm trying to keep all my code in the same format It's bits of code like this which is making me not be able to decide between which method I should use <?php echo "<div class='admin-property-box'>\n"; echo "<h1>$row[name]</h1><div style='clear:both'>&nbsp</div>\n"; echo "<form action='$_SERVER[REQUEST_URI]' enctype='multipart/form-data' method='POST'>\n"; echo "<label for='name'>Property Name:</label> <input type='text' name='name' value=''><br />\n"; echo "<label for='name'>Price:</label> <input type='text' name='price' value=''><br />\n"; echo "<label for='date'>Date:</label>\n"; @include "form-date.inc"; echo "<br />"; echo "<label for='description'>Description:</label>\n"; echo "<textarea rows='5' cols='50' name='description'>\n"; echo "$row[description]\n"; echo "</textarea><br />\n"; echo "<br />Location:<br />\n"; foreach ($locations as $l_num => $l_name) { if ($l_num == $row[location]) { echo "<input type='radio' name='location' value='$l_num' checked='checked'>$l_name<br />\n"; } else { echo "<input type='radio' name='location' value='$l_num'>$l_name<br />\n"; } } echo "<br />Type of property: <br />"; foreach ($type as $t_num => $t_name) { if ($t_num == $row[type]) { echo "<input type='radio' name='type' value='$t_num' checked='checked'>$t_name<br />\n"; } else { echo "<input type='radio' name='type' value='$t_num'>$t_name<br />\n"; } } ?> The first bit has loads of echo's which i hate typing over and over, but then theres more variables in the second bit
  14. Which is best? Method 1: <?php if ($condition == "true") { echo "<p>HTML code</p>"; } else { echo "<p>HTML code</p>"; } ?> Method 2: <?php if ($condition == "true") { ?> <p>HTML code</p> <?php } else { ?> <p>HTML code</p> <?php } ?> I have seen both used and am interestd to see if one is more efficient, or better programming practice. It looks like method 2 is the better one for large blocks of HTML when few, or no variables have to be called, and method 1 is better for short bits of HTML and/or when lots of variables are being used in the code, but what about large blocks of HTML where a quite a few variables or bits of PHP are going to be used??
  15. Hi everyone, this is my first post and I thought what better way to get started than to see what people think of my site! It's the homepage for my freelancing which I do under the name Deep-C, anyway never had any feedback from anyone really so will be nice to hear some opinions... http://www.deep-c.co.uk Thanks!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.