CSS in javascript-php

Source: Internet
Author: User
Recently, I encountered the problem of introducing css when using php. I added a login in the Header bar of the page and used session to check the user's status. LoginFilter. php {code ...} this method is used to check whether a user has logged on. if the user has logged on, the personal center is displayed... recently, I encountered the problem of introducing css when using php. I added a login in the Header bar of the page and used session to check the user's status.

LoginFilter. php


  Login"; Echo"
  • Register
  • ";} Else {echo"
  • Personal Center
  • ";}?>

    This method is used to check whether a user has logged on. if the user has logged on, the personal center is displayed. Otherwise, the logon and registration are displayed.
    In the UI library, I used the font-awsome UI library, but found that I elements cannot be used, such

    Echo"
  • Personal Center
  • ";

    Finally inserted into the ul of the Header

    
      
      
    • Home
    • League
    • Players
    • Team

    Later, I used the Bootstrap UI library, but it still didn't work. so I think it may be the problem of introducing css format errors in php.

    
      

    How can I introduce css into it?

    Reply content:

    Recently, I encountered the problem of introducing css when using php. I added a login in the Header bar of the page and used session to check the user's status.

    LoginFilter. php

    
      Login"; Echo"
  • Register
  • ";} Else {echo"
  • Personal Center
  • ";}?>

    This method is used to check whether a user has logged on. if the user has logged on, the personal center is displayed. Otherwise, the logon and registration are displayed.
    In the UI library, I used the font-awsome UI library, but found that I elements cannot be used, such

    Echo"
  • Personal Center
  • ";

    Finally inserted into the ul of the Header

    
      
      
    • Home
    • League
    • Players
    • Team

    Later, I used the Bootstrap UI library, but it still didn't work. so I think it may be the problem of introducing css format errors in php.

    
      

    How can I introduce css into it?

    Determine that the login should be controlled in the controller, and then render different view views based on the judgment results. Too many business logic judgments should not be made in the view.
    In addition, your code is incorrect. the correct code:

    Echo'
  • Personal Center
  • ';

    Without figuring out what the problem is, you can directly add it to the html head tag.

    
      

    It is introduced. what do you mean when I elements cannot be used? is it not displayed or style.

    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.