Jump to content

All Activity

This stream auto-updates     

  1. Today
  2. I personally find it easier to store the path and the filename in the database table, for example - assets/large/img-photos-1554932472.jpg. Then I simply do <img src="<?php echo $image ?>" width="478" height="1034" alt="">
  3. <img src="./images/<?php echo $product_image ?>" width="478" height="1034" alt=""> <?php echo $product_image ?> -make sure that name in db and acctual name of the image are the same do you keep images in db or just a path?
  4. Here you go https://developers.google.com/speed/pagespeed/insights/ Use this website to check your speed. You will get list of the things that needs to be done.
  5. If you have problem getting your code to work then a good first step would be to post said code.
  6. It's always these seemingly simple tasks that become challenges. I got a good handle on how to watermark some photos (thanks to respondents to my previous post) and developed a script that calls a function that uses imagettftext() Essentially, I can upload multiple images and watermark them before they reach their destination folder. Good stuff. Now, I got this crazy idea of watermarking them with a sequence number, so that if I grab 12 images, each will be labeled with it's sequence number (rather than a standard text watermark). I placed $count++ in my script, and then used $count as my $watermark both inside imagettftext and as a variable. It didn't work. The closest I got was after placing $count++ inside a watermark function, but. of course, that merely labeled each photo with a "1" (bc each call of the function was a new iteration. Can someone please offer some direction here. Thanks.
  7. I swear I tried that. At least I thought that I did. But guess what, I made the change that you suggested and it's working perfectly. I uploaded the updated include file in case anyone else wants to see it working now. I can't tell you how much I appreciate it. Thank you!
  8. Use root-relative links. <a href="/primary-directory/subsection-one/">Subsection One</a> The leading slash means the link is relative to the root of the domain name so it doesn't matter which directory you're in.
  9. How can I use an include file that has a list of links in any directory at my website without breaking those links? You can see it in action here... The links in this directory work... https://www.billelgin.com/primary-directory/ The links in this directory (being created from the same include file) do not work... https://www.billelgin.com/primary-directory/subsection-one/ Obviously the problem is the include file is being called from different directories, so it's breaking the relative path links in the include file, but what can I do to fix it? You can download the example directory structure here... https://www.billelgin.com/EXAMPLE.zip
  10. Yesterday
  11. Sounds like what you really need is to use the cookie when deciding what list of deals to show...
  12. What I was hoping to do was if you clicked the UK flag it would show the homepage with latest UK deals, if you click the US, the US deals etc. I am not sure if there’s an easy way to do this using. I am not massively familiar with using cookies in code in all honesty. If you think it’s the way to go I will do some research .
  13. It's a little more than just changing the code. Right now your site is basically the same for all countries. That's fine, but it doesn't really lend itself to there being multiple URLs for the variations. If you were to significantly change parts of the page, then new URLs would make sense. Honestly, I think what you have now is fine: use a cookie to track the localization being applied to the page. Why do you want to have different URLs?
  14. update: guess that all depends on the NS-Server entries: all seems that the Vhost creation process went well and the vhost looks "healthy" now i guess that i have to look for the entries regarding the NS-Server. what do you suggest - which tests to run - which measures to test!?
  15. update: runned a ping test sent 10 ICMP-Pakets to the server result: - invalid host.
  16. in other cases it looks like so - on all adresses!? this is different
  17. update: see the directives DocumentRoot "/sites/www.my_domain.org" /usr/local/apache/conf/vhost/vhost.conf (67) ServerName www.my_domain.org /usr/local/apache/conf/vhost/vhost.conf (68) <Directory "/sites/www.my_domain.org"> allow from all /usr/local/apache/conf/vhost/vhost.conf (70) Options None /usr/local/apache/conf/vhost/vhost.conf (71) Require all granted /usr/local/apache/conf/vhost/vhost.conf (72) </Directory> guess: *. seems to be correkt, * notes - all adresses, the point notes the end of the term in the handle.
  18. hello dear all - on webmin - i have on a freshly created vhost i have the following the phrase is like so: Handles the name-based server www.my-domain.org on address *. what makes me wonder is why do we have .... address *. look forward to hear from you
  19. Once again @Barand you come to me rescue thanks again
  20. echo $row->$a['currency']['available']['reserved']; I don't know where you're getting "$a" from but it doesn't belong there. If you print_r($row) you'll see what the value is. It's an object with "currency", "available", and "reserved" properties. Like any other object, you access them like ->currency.
  21. We won't slap your wrist, but we'd prefer you didn't post it and would remove it if you did. To help not spread those things around, you know? It does sound like malware, but it's possible it is merely obfuscated code (like if it came with a paid license and the author didn't want anyone to mess with it). Does the file say anything about eval or base64_decode or gunzip/deflate? Does it look the slightest bit readable? You can PM it to me if you'd like me to confirm. If it is malware then obviously you need to contact your client so they can begin damage control. Hopefully the file hasn't been there for long. It would help them if you could check webserver access logs for requests to that file so see if/how often it ran.
  22. So...is there an actual question here...is this just a blog post? If it's the latter, please refrain from posting things like this here. Unless someone specifically asks about how child-themes work in WordPress. Even if they ask, it would be better to point them to the WordPress manual.
  23. If your numbers are going to be 1-5 then you might try this: // assume that $i is the number 3 $idx = $i-1 echo "Name is: ".$name[$idx];
  24. If you define your array like this, to begin the indexing at 1 instead of 0, $names = array (1 => "Stan", "John", "Dean", "Sam", "Lee"); then your indexes will align with your $num values, 1 - 5; In other words $num = 5; echo $names[$num]; //--> Lee That will save you doing what ginerjm is about to tell you to do
  25. Also, can I ask what's going on here: $num1 = (5); Is there a reason for the parentheses? Apparently PHP doesn't care if they are there. PHP appears to ignore them. Unless there is a reason for using the parentheses, it would be clearer to use the following: $num1 = 5;
  26. There's a syntax error in your if statement. The following manual page provides examples on writing if statements: https://www.php.net/manual/en/control-structures.elseif.php It might also help to review the following page when it comes to the comparison operator: https://www.php.net/manual/en/language.operators.comparison.php
  1. Load more activity
×
×
  • 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.