473,385 Members | 1,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

PHP and sub-path parameters ?

When I used to write ISAPI DLLs, I could create a web app XYZ.DLL and
call it like this:

http://www.xyz.com/cgi-bin/xyz.dll/o...suboption2?x=4
(real example http://www.craznar.com/cgi-bin/cz.dll/freestuff )

Is there any way to achieve this with PHP ?

e.g.

http://www.xyz.com/cgi-bin/xyz.php/o...suboption2?x=4

Such that I would have something like:

$_GET['path'] = '/option1/suboption2'
$_GET['x'] = 4;

Can I do this:
http://www.xyz.com/cgi-bin/xyz.php?o...suboption2&x=4

or do I explicitly have to

http://www.xyz.com/cgi-bin/xyz.php?p...suboption2&x=4


--
Spam:newsgroup(at)cr*********@verisign-sux-klj.com
EMail:<0110001100101110011000100111010101110010011 010110
11001010100000001100011011100100110000101111010011 011100
11000010111001000101110011000110110111101101101001 00000>
Jul 17 '05 #1
2 3329
127.0.0.1 wrote:
When I used to write ISAPI DLLs, I could create a web app XYZ.DLL and
call it like this:

http://www.xyz.com/cgi-bin/xyz.dll/o...suboption2?x=4
(real example http://www.craznar.com/cgi-bin/cz.dll/freestuff )

Is there any way to achieve this with PHP ?

e.g.

http://www.xyz.com/cgi-bin/xyz.php/o...suboption2?x=4

Such that I would have something like:

$_GET['path'] = '/option1/suboption2'
$_GET['x'] = 4;

Can I do this:
http://www.xyz.com/cgi-bin/xyz.php?o...suboption2&x=4

or do I explicitly have to

http://www.xyz.com/cgi-bin/xyz.php?p...suboption2&x=4


Afaik it isn't possible in PHP... but if you use Apache as your
webserver, you could try:
http://httpd.apache.org/docs/mod/mod_rewrite.html

Regards,
Johan

Jul 17 '05 #2
Hi,

127.0.0.1 wrote:
When I used to write ISAPI DLLs, I could create a web app XYZ.DLL and
call it like this:

http://www.xyz.com/cgi-bin/xyz.dll/o...suboption2?x=4
(real example http://www.craznar.com/cgi-bin/cz.dll/freestuff )

Is there any way to achieve this with PHP ?

e.g.

http://www.xyz.com/cgi-bin/xyz.php/o...suboption2?x=4

Such that I would have something like:

$_GET['path'] = '/option1/suboption2'
$_GET['x'] = 4;

Can I do this:
http://www.xyz.com/cgi-bin/xyz.php?o...suboption2&x=4

or do I explicitly have to

http://www.xyz.com/cgi-bin/xyz.php?p...suboption2&x=4


It seems that if PHP is an Apache module (and possible modules for other
servers) you can say:

http://www.xyz.com/cgi-bin/xyz.dll/o...suboption2?x=4

But it doesn't work with PHP as a CGI as the server gets confused about
what to run.

You can have any data you like after the ? if you don't mind parsing it
yourself (see $_SERVER["QUERY_STRING"]), so option 2 is open, and as you
say your final suggestion works too.

So I'd say that's all of them :-) Take your pic.

Regards,

Luke

Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: John Dewbert | last post by:
*** post for FREE via your newsreader at post.newsfeed.com *** Hello, I have trouble passing a folder object (from a FileSystemObject) to a sub procedure. Consider the following code: ...
2
by: tshad | last post by:
I have an example I copied from "programming asp.net" (o'reilly) and can't seem to get the Sub (writefile) to execute. It displays all the response.write lines that are called directly, but not...
5
by: Colleyville Alan | last post by:
I have a sub that can do two different tasks based on the value of one variable. So I'd like to have two different buttons on the same form run this, but each one setting a flag so that the...
3
by: Kathy Burke | last post by:
Hi, I'm tired, so this question may be silly. I have a fairly long sub procedure. Based on one condition, I load another sub with the following: If Session("GRN") = "complete" Then txtScan.Text...
10
by: tmaster | last post by:
When I try to dynamically add a second sub menu item to this ContextMenu item, I get an error 'Specified argument was out of the range of valid values'. Private Sub mnuTopics_Show_Select(ByVal...
12
by: Ron | last post by:
Greetings, I am trying to understand the rational for Raising Events instead of just calling a sub. Could someone explain the difference between the following 2 scenarios? Why would I want to...
1
by: dBNovice | last post by:
Please help! I have 3 forms: Task, Subtask, Elements. Elements is a subform of Subtask and Subtask is a subform of Task. I am able to navigate from Task to Subform to Element and from Element to...
5
by: Sharon | last post by:
Hi all. To prevent access to a sub system internal types, is it necessary to create the sub system in a different project, and use the internal access level? Or is there another way that will...
6
by: Greg Strong | last post by:
Hello All, Is is possible to use an ADO recordset to populate an unbound continuous Subform? I've done some Googling without much luck, so this maybe impossible, but let me try to explain...
6
by: Thom Little | last post by:
Using C# 3.5 I have a form that calls many other sub-forms. Typically there will be five forms open at the same time. If the main form is closed all the sub forms are also closed. Is there...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.