Simple php problems

Source: Internet
Author: User
For a simple php question, I would like to ask you how to define the URl path when compiling code in php, such as www.bon.com/product.php? Cat = abc & amp; method = 456. It is mixed encoding, with no controller or model ., How can I write it freely? if it's not a simple problem in the company or group of php
I would like to ask you how to define the URl path when compiling code in php, such as www.bon.com/product.php? Cat = abc & method = 456. It is mixed encoding, no controller, model.

------ Solution --------------------
How can I write it freely? if you are not in a company or a team, follow your habits...

$ ImgUrl = './images /';
Using imgname='test.jpg ';
$ GoUrl = './product. php? Cat = abc & method = 456 ';

Echo "";

There are many methods. you can also use the replacement method ....

------ Solution --------------------
Discussion
How can I write it freely? if you are not in a company or a team, follow your habits...

$ ImgUrl = './images /';
Using imgname='test.jpg ';
$ GoUrl = './product. php? Cat = abc & method = 456 ';

Echo "";

Many methods ......

------ Solution --------------------
Discussion

Yes. for example, if I have an image on the home page and click it to connect to a detailed page, how can I write the connection path?

------ Solution --------------------
Agree with the statement on the third floor. if it is not in a company or group, you can write it according to your own habits.
------ Solution --------------------
Www.bon.com/product.php? Cat = & Method =
------ Solution --------------------
You can control the URL by yourself. you can use pathinfo with Rewrite.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.