Jump to content

PHPete

Members
  • Posts

    24
  • Joined

  • Last visited

Everything posted by PHPete

  1. Thanks a lot for the suggestions, Adam. I'd rather keep the text as it is, simply because I want to use as few images as possible. As for adding more spacing between the four context areas, I can't really. It JUST fits on my1024x768 resolution, although I suppose I can try with fluid widths. I'm going to re-think the colour scheme, the colours there were honestly just hastily thrown in as I tried to make it less dull. I'll also see about reducing the image sizes. Again, thanks a lot for the reply.
  2. I recently revamped my portfolio. It's HTML5 valid. The CSS is NOT valid because I'm using rounded corners and transitions. The image gallery is pure CSS. Overall, I'm happy with it. Right now I don't have a lot to show, but I'm currently working with a client, so I AM doing work. http://pete-murray.co.uk/
  3. Pretty much. I can design, but it's really difficult for me. I know all I have to do is practice, but right now, it's a struggle.
  4. I also forgot to mention, regarding my level of skill, I believe my level of skill in graphic design is adequate for the website design I do. The reason my website is lacking graphics is that I wanted it to be more functional than anything else.
  5. I figured that would be an answer, and I completely agree. I'll include some graphical elements to my design and create some better examples in my portfolio.
  6. This is my online web development/design portfolio. http://pete-murray.co.uk/ I like it... I just feel it could be better, especially since it's a web design portfolio. The thing is, I'm still not a great with graphics yet... Anyway, I'm looking forward to your opinions.
  7. Don't I feel stupid. XD Are their any security issues with?: <?php $page = isset($_GET['page']) ? $_GET['page'] : 'home'; //checks if there is content for the chosen if(file_exists('content/'.$page.'.php')) { //if there is, it is included include('content/'.$page.'.php'); } else { if(file_exists('content/404.php')) { //if their wasn't any content include('content/404.php'); } } ?>
  8. Here's a live example, I'm having trouble explaining. http://pete-murray.co.uk/ Valid site. Links all work. http://pete-murray.co.uk/random/url Breaks it. It's because of the slash in the URL but I don't know how to go about fixing it.
  9. I tried (I think regex) on it to ignore slashes, I couldn't figure it out. I'll take a look at the link, thanks.
  10. I hate to bump, but it was on the second page and I'm still not sure how to fix this. ><
  11. strtolower is basically just "string to lower(case)". It just converts a string to all lower case.
  12. Ah right. Cool. That seems a lot easier than the $pageID method I used.
  13. Would that not cause problems in sub directories? say the URL was website.com/directory/index.php The link to website.com/index.php would be active. Correct me if I'm wrong.
  14. Oh right. I've never really used PHP_SELF, jsut read a little bit about it.
  15. I'm hoping this isn't too far off topic, but this article explains the security issues within PHP_Self.
  16. What I'd do is give each page a variable, let's say in each page you have something like <?php $pageID = '1'; ?> But change the number for each page. Then, for your navigation, you could have <ul> <li><a href="#" <?php if ($pageID == '1') {echo 'class="active"';} ?>>Home</a></li> <li><a href="#" <?php if ($pageID == '2') {echo 'class="active"';} ?>>Link 2</a></li> </ul> Etc... As far as I can see, this could work. I'm not sure if there are any problems with this method, or if it'll cause any problems within your site. I hoe it works alright though.
  17. The backslashes escape quotes. Try adding an extra quote if (!is_dir($base."/".$get_album) || strstr($get_album,".") !=NULL || strstr($get_album,"/") !=NULL || strstr($get_album,"\\"") !=NULL)
  18. CORRECTION: It shows the 404 content. Not sure if that actually makes a difference. xD
  19. Ah, I can't believe I missed that. :/
  20. The problem seems to be with the quotes in this line, but I'm not sure why. (I could also be completely wrong, this is just what I can see)
  21. From what I can see I think you've gone wrong with the quotes. The colour shows that most of that is a string rather than the code.
  22. Interesting in a good way? It's rather old and I did some things in an odd manner.. but it's still somewhat correct xD 1: It happens whether the directory exists or not. 2: #Hide directories IndexIgnore * #URL Rewrite <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^\.]+)$ index.php?page=$1 [NC,L] </IfModule>
  23. Firstly, I'd just like to say hello, seeing as this is my first post. I've had a look about and I think I'm going to enjoy my stay here. Now, here's my problem. I'm using $_GET to power dynamic-content. <?php //creates page variable $page = isset($_GET['page']) ? $_GET['page'] : 'home'; ?> <?php //checks if there is content for the chosen if(file_exists('content/'.$page.'.php')) { //if there is, it is included include('content/'.$page.'.php'); } else { if(file_exists('content/404.php')) { //if their wasn't any content include('content/404.php'); } } ?> So say, for example, I have "Hello World!" in a file called helloworld.php and I go to websiteurl.com/helloworld (I've set up .HTACCESS to ignore "index.php?page=") The "Hello World!" would display fine. The problem I'm having is if someone tries an url like this: websiteurl.com/directory/file It will display the content for the default (in this case home, since that's what I set it to at the start) in the directory. This means there is no styling and I run into a whole load of problems after that. So, that's my problem. Does anyone know how I would solve this? I'm unsure if it's because of the .HTACCESS or the way the PHP is being used. I'd also like to know if there are any other security flaws with this code? I'm also sorry if I've been unclear or if my sentences don't make sense (it's rather later and I'm not sleeping lately) And lastly, I'm sorry if I've broken any forum rules, since this is my first post I'm a little weary. Thanks a lot guys. Pete.
×
×
  • 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.