Rookie question: How to copy PHP code to another PHP file, and why it can't be implemented

Source: Internet
Author: User
Tags ftp site smarty template
The code of our company's website, now I want to combine the functions of two interfaces. HTML and the corresponding PHP have been found, and one of them copied to another PHP file, why cannot be implemented. is the same website ...
The code is as follows
Php:



_tpl_vars[' data ' [' title '];?>



_tpl_vars[' data ' [' description '];?>





The price of the net: ¥ _tpl_vars[' data ' [' bwjiage '];?>
Market Price: ¥ _tpl_vars[' data ' [' scjiage '];?>






Type of learning vehicle

_tpl_vars[' leixing ']; if (!is_array ($_from) &&!is_object ($_from)) {Settype ($_from, ' array ');} if (count ($_from)):
foreach ($_from as $this->_tpl_vars[' k '] = = $this->_tpl_vars[' V '):
?>

_tpl_vars[' k '] = = 0):?> class= "Hover" Lx= " _tpl_vars[' V '];?>
"> _tpl_vars[' V '];?>












Amount of down Payment:

200 400 600 800 1000 1500 2000

Number of months in installments:

_tpl_vars[' Qishu ']; if (!is_array ($_from) &&!is_object ($_from)) {Settype ($_from, ' array ');} if (count ($_from)): foreach ($_from as $this->_tpl_vars[' V '):?> _tpl_vars[' V '];?> months



Can I have a few installments?



Note: _tpl_vars[' data ' [' zhuming '];?>











>> View Staging Process









Html:



{{$data. Title}}



{{$data. Description}}





The price of the net: ¥{{$data. bwjiage}}Market Price: ¥{{$data. Scjiage}}





Type of learning vehicle

{{foreach from= $leixing item=v key=k}}

{{$v}}

{{/foreach}}









Amount of down Payment:

200 400 600 800 1000 1500 2000

Number of months in installments:

{{foreach from= $qishu item=v}}{{$v}} months {{/foreach}}



Can I have a few installments?



Note: {{$data. zhuming}}











>> View Staging Process











{{$data. Content}}





Optional Learning vehicle



      {{fflist catid=29 pagesize= "7" to= "KXJX" order= "' sort ' asc, ' create_time ' desc '}}

      {{foreach from= $kxjx item=kx}}











    • {{$kx. Title}}






    • {{/foreach}}






I'm a rookie, not a moron.


Reply to discussion (solution)

What are you copying, visual? One is the template engine, one is the native PHP file does not work on it.

What are you copying, visual? One is the template engine, one is the native PHP file does not work on it.


No access to PHP, nothing ...
This is like a template file. I want to modify it, but I do not know how to modify, in the template file there are some styles and so on can be changed. But as long as the variables, methods, functions and so on can not be changed. So I found PHP native files in there to modify, but still can not change, what is the matter???


What are you copying, visual? One is the template engine, one is the native PHP file does not work on it.


No access to PHP, nothing ...
This is like a template file. I want to modify it, but I do not know how to modify, in the template file there are some styles and so on can be changed. But as long as the variables, methods, functions and so on can not be changed. So I found PHP native files in there to modify, but still can not change, what is the matter???


I was in a folder called Templates_c found in the PHP file, as if I see this is a compilation folder on the Internet meaning, is not directly modify the compiled PHP does not ah?

Templates_c is a temporary file, each time the program runs, a new file is overwritten, so you change the white change.

Now that you have the Templates_c directory, you are using the Smarty template engine.
It is recommended that you carefully read the Smarty3 user manual, it is best to download a copy for a rainy day
Https://www.baidu.com/s?ie=UTF-8&wd=Smarty3+%E6%89%8B%E5%86%8C

Templates_c is a temporary file, each time the program runs, a new file is overwritten, so you change the white change.


That should change which file to be effective Ah, is there a original file or something? Please tell me thank you.

Now that you have the Templates_c directory, you are using the Smarty template engine.
It is recommended that you carefully read the Smarty3 user manual, it is best to download a copy for a rainy day
Https://www.baidu.com/s?ie=UTF-8&wd=Smarty3+%E6%89%8B%E5%86%8C


I'm looking at this, but it's a lot of time, I think. Before this can not give me a hint how to get this problem, the boss every day, I this web site art tears collapsed

Change the file under the Templates directory

Change the file under the Templates directory


I looked at the php file under the Templates folder, it feels different from PHP under the Templates_c folder, it doesn't seem to correspond to HTML. Are the method classes. And it will not be associated with a particular HTML, why in the same HTML, some variables can use some of the use???


Change the file under the Templates directory


I looked at the php file under the Templates folder, it feels different from PHP under the Templates_c folder, it doesn't seem to correspond to HTML. Are the method classes. And it will not be associated with a particular HTML, why in the same HTML, some variables can use some of the use???


I found these php in templates, and I didn't feel anything like HTML.






Not these, you look for other folders. TPL, or. html files

Not these, you look for other folders. TPL, or. html files


Will there be such a situation I under the FTP site is not complete, before I do. NET, compile will delete the. cs file, PHP has this situation?
  • Related Article

    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.