Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=340355.0
  2. You could do so using the rule you currently have. Just place.... if (isset($_GET['p'])) { echo $_GET['p']; } in your index.php file and go to http://yourdomain.com/foo.php If it echo's foo it's working.
  3. Of course this can be scripted. You can include config files within config files in Apache, so you just create a new config file for each new domain. However, you wouldn't use plain old virtual hosts for this because Apache needs to be restarted for them to take effect. You would need to use mod_vhost_alias. See http://httpd.apache.org/docs/current/vhosts/mass.html
  4. That rule is nothing like what you need. Can I suggest you find some tutorials? It's a pretty basic rule you need but your not going to learn anything if we just hand it to you.
  5. This topic has been moved to Other Web Server Software. http://www.phpfreaks.com/forums/index.php?topic=340298.0
  6. Why on earth would you be using Windows as a development environment? And yes, of course there are DNS servers you can run locally. I use dnsmasq on Linux as it's simple to configure. On Windows? I wouldn't know, but I'm sure it comes built into the server versions.
  7. Have you looked at any tutorials on mod_rewrite? Both of your rules are pretty straight forward and would be covered in any introduction tutorial.
  8. You read and agreed to the rules when you signed up. Of course you can, though the code you have posted doesn't make a great deal of sense.
  9. Muddy_Funster, you might want to read the rule right under the one you highlighted.
  10. It would be easier to do it the other way around and have the client request the server like normal. Otherwise, your going to need to write a server into your client side application.
  11. RewriteRule ^user=([A-Za-z0-9-]+)/?$ profile.php?user=$1 [L] Yes, because you are still actually receiving a request to profile.php?user=testing as if the rewrite doesn't exist.
  12. Couldn't tell you without seeing your markup.
  13. This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=340273.0
  14. This topic has been moved to Editor Help (Dreamweaver, Zend, etc). http://www.phpfreaks.com/forums/index.php?topic=340269.0
  15. This topic has been moved to PHP Coding Help. http://www.phpfreaks.com/forums/index.php?topic=340267.0
  16. $file = fopen("/tutorials/" . $tutorId . ".txt", "r") or exit("File not found");
  17. Actually, my mistake, you should be setting it to $('#pika').val(). $('#pika') is a jQuery selector, nothing to do with json. You can read about them here: http://api.jquery.com/category/selectors/
  18. You need to send the actual data. $(document).ready(function() { $('#pika').click(function() { $.post('earn.php', { pika:$('pika') }, function(data) { alert(data); }); return false; }); });
  19. Pff, this is simple method chaining and there is nothing wrong with it. There is absolutely zero difference between: $sql = new SQL $sql->select('news, date') $sql->from('news') $sql->execute(); and the previous code. It's just easier to read IMO.
  20. You could depending on the amount of data. I would be more inclined to go down the Ajax path. When a link is clicked you send the id back to the server, executing a script to get the data, then send it back to the client as a json object.
  21. Again: This is a client setting, there is nothing you can do about it. Some clients may choose to receive text only email fro instance. There is little you can do.
  22. This is a client side setting. There is little you can do about it.
  23. But the $entries array is a php array which has already been created and long forgotten by the time your page has been created. You could put the contents of your $entries array into hidden divs (when the page is created) and have Javascript un-hide these divs when the appropriate link is clicked. Does this sound like what you want?
  24. My first reply tells you exactly what you need.
  25. If the file you want to include has php that needs to be processed file_get_contents() won't help. You would need your own function for this. function include_as_string($file) { ob_start(); include $file; return ob_get_contents(); }
×
×
  • 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.