Jump to content

Ivan Ivković

Members
  • Posts

    139
  • Joined

  • Last visited

    Never

Everything posted by Ivan Ivković

  1. Try something like this: $string = $fetch['code']; // contains: echo "String"; eval($string);
  2. Can PHP dynamically change .htaccess files?
  3. I'm making an admin so I need to be able to do this: https://admin.mysite.com Run an upload image script from a file, saves image to folder in http://www.mysite.com Image Folder
  4. Check your PHP file encoding. It should be UTF8.
  5. for($i = 0; $i < 0; $i++){ if (file_exists("images/".$id."/img0".$i .".jpg")) { echo "<a href=\"/v1/images/".$id."/img0".$i .".jpg\" rel=\"lightbox\"><img src=\"/v1/images/".$id."/thumb0".$i .".jpg\" class=\"img\" border=\"0\" width=\"60\" height=\"60\"></a> "; } }
  6. if(!empty($_GET)){ // Load content. }else{ // Put a welcoming image. }
  7. Weird fetishes are the reason we're all here.
  8. That's the way it should be. You definetly should not have name_lastname.php file formats in your site.. That's just... Plain wrong and messy. That would require you to have an endless amount of files for each user. As Colton Wagner said, these things are usually done by $_GET variables, or just extracting user_id from $_SESSION variable and filling the page according to that data.
  9. Ok I'm programming an admin board, so that's not really nessessary then. So it's not a lot of extra processing power... But when I start developing large-scale I'll keep the backuping method in mind.
  10. Such as? If there's smthn wrong in what you see, please gimme a tip. THANKS! So lesser the HTML spaces, but PHP intact?
  11. Do I really have to care about the amount of spaces/tabs I have in my program? Is my code good? Example: class SportListout{ public $start; public $db; private $junk = 'This is junk data. Unable to find it \'s parents. It is recommended that you delete this data.'; function __construct($db){ $this -> db = $db; $this -> setStartingParent(); } function searchListout($sp){ $notif = 'There are no search results that match that criteria.'; if(strlen($sp) > 0){ if(strlen($sp) < 3){ This is my common text format. Is this ok or should I not make spaces in between functions?
  12. Remove this part? div#Text { /* <DIV>Text</DIV> */ position : absolute; left : 0.8cm; top : 13.5cm; width : 10.0cm; height : 5.5cm; }
  13. Yea that may be because 'font' accepts only PT, while font-size can accept px, em, pt... You can't actually align it to center if you entered position: absolute; and stuff... These are possible solutions to orientation: <center> <div id="Text" class= "cc01"> <p> <?php ECHO $display_block; ?> </p> </div> </center> <div style='text-align: center;'> <div id="Text" class= "cc01"> <p> <?php ECHO $display_block; </div> ?> </p> </div> div#Text{ float: center; }
  14. Try: .cc01 { /* Common */ font : 24px 'French Script MT' !important; color : #000000; } or .cc01 { /* Common */ font-family : 'French Script MT' !important; font-size : 24px; color : #000000; }
  15. Try putting them into the same folder and replace the link with: <link rel="stylesheet" href="style.css" type="text/css" />
  16. a{ color: blue; /* All links blue. */ } nav a{ color: red; /* All links in nav red. */ } I guess this'll do?
  17. So yea, we mostly include our css via <link rel='stylesheet' type='text/css' href='style.css'/>, but I just found that I can make CSS work from an included PHP file in <style></style> tag printed out dynamically based on any settings I make. But the downside is that this ends up scattered around the HTML output. Does this reduce the performance in any way? I wish we could put PHP in css files.. :/ Please note that I'm new to programming.
  18. It seems to me that they're totally the same. Are they?
  19. If there's someone who likes to teach and help others, I'd like someone who can review my code once in a while... Just to know if I'm doing stuff wrong. No, I don't mean someone who would fix my code or help when I'm stuck. Just take a look at it when it's done and tell me if I'm doing something in the wrong way. Anyone who would want to, leave an inbox message or mail me at [email protected]
  20. Based on SocialEngine, a lot of modifications. http://www.sportville.co What do you think?
  21. Dzelenika, this is not what I meant. Thanks. ManiacDan, that's a GREAT IDEA! Thanks.
  22. Yes, something like that. __set() is called when you try to set a value to a non-existing member. __get() is called when you try to access a non-existing member. I'm trying to find or 'create' a magic method that will respond when I try to access a member that does not have any value. I don't want to overoccupy my constructor... So I want that function to be independent.
  23. Is there any way to produce a custom magic method? Let's say when I try to get an attribute that doesn't have any value, a method gets called that gives that attribute a value. So I want a method to be triggered when I try to get a value from an attribute that doesn't have any value.
×
×
  • 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.