Welcome our webmaster and SEO forum
Please enjoy the forum, contribute what you can, and wind up the Moderators!

View Poll Results: Do you what that servers to parse php code in html files ?

Voters
1. You may not vote on this poll
  • Yes

    1 100.00%
  • No

    0 0%
Closed Thread
Results 1 to 8 of 8

Thread: html pages understand the php code ?

  1. #1
    criserb1 Guest

    Default html pages understand the php code ?

    It is useful for servers to parse php code in html files? In my opinion I think it is very useful, because sometime the php function are very ease to use either for a non experienced web designer/developer. In my web designer/developer work I found this problem very frequent.

    I want to know your opinion about that and if you think that this isn’t useful please argument that.

    Cristi

  2. #2
    crowebird is offline Senior Member crowebird is on a distinguished road
    Join Date
    Aug 2004
    Posts
    263

    Default

    If that would mean I can use php without my host needing to support it then yes becuase my host does not support php.

  3. #3
    Alexandru Ungur is offline Senior Member Alexandru Ungur is on a distinguished road
    Join Date
    Aug 2004
    Posts
    165

    Default

    Quote Originally Posted by crowebird
    If that would mean I can use php without my host needing to support it then yes becuase my host does not support php.
    No, it only means that you can have the .thml files parsed as .php scripts. You still need support for regular .php scripts from your hosting provider.

  4. #4
    Alexandru Ungur is offline Senior Member Alexandru Ungur is on a distinguished road
    Join Date
    Aug 2004
    Posts
    165

    Default Re: html pages understand the php code ?

    Quote Originally Posted by criserb1
    It is useful for servers to parse php code in html files? In my opinion I think it is very useful, because sometime the php function are very ease to use either for a non experienced web designer/developer. In my web designer/developer work I found this problem very frequent.

    I want to know your opinion about that and if you think that this isn’t useful please argument that.

    Cristi
    Very bad ideea from a performance point of view:

    HTML NOT PARSED AS PHP
    ------------------------------------------------------------
    command used: ab -n1000 http://velnet.wrk/agree.html
    This is ApacheBench, Version 1.3d <$Revision: 1.70 $> apache-1.3
    Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
    Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/

    Benchmarking velnet.wrk (be patient)


    Server Software: Apache/1.3.29
    Server Hostname: velnet.wrk
    Server Port: 80

    Document Path: /agree.html
    Document Length: 21441 bytes

    Concurrency Level: 1
    Time taken for tests: 6.866 seconds
    Complete requests: 1000
    Failed requests: 0
    Broken pipe errors: 0
    Total transferred: 21726000 bytes
    HTML transferred: 21441000 bytes
    Requests per second: 145.65 [#/sec] (mean)
    Time per request: 6.87 [ms] (mean)
    Time per request: 6.87 [ms] (mean, across all concurrent requests)
    Transfer rate: 3164.29 [Kbytes/sec] received

    Connnection Times (ms)
    min mean[+/-sd] median max
    Connect: 0 0 2.0 0 44
    Processing: 4 5 4.2 5 50
    Waiting: 0 0 1.2 0 36
    Total: 4 6 4.6 5 50


    HTML PARSED AS PHP
    ------------------------------------------------------------
    command used: ab -n1000 http://velnet.wrk/agree.html
    This is ApacheBench, Version 1.3d <$Revision: 1.70 $> apache-1.3
    Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
    Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/

    Benchmarking velnet.wrk (be patient)


    Server Software: Apache/1.3.29
    Server Hostname: velnet.wrk
    Server Port: 80

    Document Path: /agree.html
    Document Length: 21441 bytes

    Concurrency Level: 1
    Time taken for tests: 13.980 seconds
    Complete requests: 1000
    Failed requests: 0
    Broken pipe errors: 0
    Total transferred: 21606000 bytes
    HTML transferred: 21441000 bytes
    Requests per second: 71.53 [#/sec] (mean)
    Time per request: 13.98 [ms] (mean)
    Time per request: 13.98 [ms] (mean, across all concurrent requests)
    Transfer rate: 1545.49 [Kbytes/sec] received

    Connnection Times (ms)
    min mean[+/-sd] median max
    Connect: 0 0 2.0 0 49
    Processing: 10 13 6.7 11 64
    Waiting: 0 0 1.4 0 31
    Total: 10 13 7.4 11 113


    As you can see it took 6,9sec to parse 1000 times a certain file as .html as opposed to 14 secondes to parse *the same file* as PHP this time.

  5. #5
    criserb1 Guest

    Default

    Yep, I see the differences... but many of php function are very good sometime, and I think there are not similarly functions in HTML.

  6. #6
    Alexandru Ungur is offline Senior Member Alexandru Ungur is on a distinguished road
    Join Date
    Aug 2004
    Posts
    165

    Default

    Quote Originally Posted by criserb1
    Yep, I see the differences... but many of php function are very good sometime, and I think there are not similarly functions in HTML.
    Then go for it, but you should consider using plain .php files, and not parsing all .html files as .php. With a little trickery, you can *make .php files look like .html*. It's much better than the other way around.

  7. #7
    criserb1 Guest

    Default

    Thanks Alex

  8. #8
    Alexandru Ungur is offline Senior Member Alexandru Ungur is on a distinguished road
    Join Date
    Aug 2004
    Posts
    165

    Default

    You are welcome

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Forum HTML/BB Code or whatever
    By redlinemaxed in forum General Webmaster Talk
    Replies: 3
    Last Post: 08-31-2007, 12:08 PM
  2. Microsoft to give access to code
    By temi in forum Computer and Software Forum
    Replies: 1
    Last Post: 02-17-2006, 09:05 AM
  3. Google Summer of Code
    By ovi in forum General Webmaster Talk
    Replies: 1
    Last Post: 06-15-2005, 09:21 PM
  4. w00t, learned how to code in php
    By crowebird in forum General Webmaster Talk
    Replies: 9
    Last Post: 03-30-2005, 10:16 AM
  5. Choose button GIVES php code
    By lim038 in forum iG Shop
    Replies: 0
    Last Post: 04-25-2004, 10:56 AM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124