Jump to content

johnnyjohnny

Members
  • Posts

    14
  • Joined

  • Last visited

    Never

Everything posted by johnnyjohnny

  1. I meant to ask how to convert "media/browse?key=hello" to "control/media?request=browse&key=hello"? And what i have now is: RewriteRule ^([^/]+)/([^/]+)?([^/]+)$ control/$1?request=$2&$3 [L]
  2. How to convert "media/browse?key=hello" to "control/media?r=browse&key=hello"? Thanks in advance. Tried: RewriteRule ^([^/]+)/([^/]+)?([^/]+)$ control/$1?request=$2&$4 [L] Didn't work out.
  3. Is it possible to turn "control/test/hello?you=me" into "control/test?request=hello&you=me"? Tried using: RewriteRule ^control/(.+)/(.+)\?(.+)$ control/$1?request=$2&$3 Please help me.
  4. I understand that, but to me this way it's nicer as "request" is implied.
  5. Is it possible to turn "control/test/hello?you=me" into "control/test?request=hello&you=me"? Tried using: RewriteRule ^control/(.+)/(.+)\?(.+)$ control/$1?request=$2&$3 Didn't seem to work. Thanks for any help. ???
  6. That's interesting, do you mind elaborate more on that more?
  7. Not quite, the site I am working on is complete Ajax based, and the problem I ran into is the back/forth button and bookmark will not function, so to correct that the server side is going to catch the "#" part and decide what to display, so sadly it has to be processed on the server side.
  8. That's will only print "/" for me.
  9. is it possible to catch full php url, like this one? especially the part after #. http://foo.com/#additionalinfo thanks
  10. I don;t quite understand. p.s. it's not OOP.
  11. That's what I thought, but surprising no.
  12. I want to establish the similar setup Rails has, MVC, controller gets request, retrieves the model, view uses the model to output html. What is the best way to pass the model variable from the controller script to the view script? (view function is called within controller script) i.e. //controller <?php $model = new User(); $model->user_name = "johnnyjohnny"; $output_html(); ?> //view <?php function output_html() { echo "<div>$model->user_name</div>" } ?> how to pass model from controller to view? thanks in advance
  13. You guys are the best. @Crayon Violent: The reason why i don't want to hardcode " with \", which is what I did, I guess is because the html inside the foo() function would seem identical to its html counter-part. Again, thank you very much for your reply.
  14. Question: Say I have a include file with a function that produce html //include.php <?php function foo() { ?> <div id="hello"> hello </div> <?php } ?> and another file calls the foo() function //controller.php foo(); Is it possible to add slashes to the html produced by foo() in controller file? i.e. turn <div id="hello"> to <div id=\"hello\"> I tried to use addslashes(foo()), didn't seem to work thanks for any help
×
×
  • 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.