Jump to content
The Uniform Server Community
mynpc

Dynamic URL & Uniserver 3.3

Recommended Posts

Hi,

 

I just discover this server and think it's fantastic, but I got a problem. I've downloaded Uniserver 3.3 and wrote a page with dynamic link, for example: test.php?id=6

The variable id didn't show up, if I echo it in test.php. Do I have to change any setting to have it work?

 

mynpc

Share this post


Link to post
Share on other sites

Have you tested this script on other web servers. I've had no problems with URL parameters using Uniform Server (using either php or perl). Are you using $_REQUEST['id'] to get the parameter?

 

I just created a dirt simple test.php script in w:/www/rick/php:

<HTML>

<BODY>

<?php

echo "<p>id is " . $_REQUEST['id'] . "</p>";

?>

</BODY>

</HTML>

 

With Uniform Server running, executing it via http://localhost/rick/php/test.php?id=5

results in:

id is 5

as I'd expect.

Share this post


Link to post
Share on other sites

Thank you for the quick answer. I didn't used $_REQUEST, that's why it doesn't work. I was used to just to write echo $id. On my web server it work without $_REQUEST, so I thought that the configuration of Uniform Server 3.3 was different. :)

 

Thanks

mynpc

Share this post


Link to post
Share on other sites

$_GET['id'] will also work...

 

<?php
echo $_GET['id']; // URL: test.php?id=5

// 5 is outputted
?>


Known Languages:
adv-XHTML, int-PHP, int-SQL, int-CSS, beg-Python

Currently reading: Take off in Japanese, How to play popular piano in 10 easy lessons, The Magicians' Guild
Currently learning: Python, Piano, Japanese
Current project: Relaxing
Currently playing: FalcHedgehog.gif

Share this post


Link to post
Share on other sites

Yea, register_globals is a real pain for me. If it is off, NONE of my scripts will run, and it just annoys me to hell!

 

But, I suppose it is best I adapt my scripts to work with it off. ^^'


IPB Image - Hail my own banner for UniServer!

Share this post


Link to post
Share on other sites

just create a .htaccess file with the following

php_flag register_globals On

to the directory that has the script


IPB Image

 

IPB Image

if you like this Uniform Server User Sing take em i do not mind share

IPB Image

 

IPB Image

Share this post


Link to post
Share on other sites

"Hackish" ways of doing things are always dangerous :D

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...