Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
0 user currently in Programming. | 3 guests
Acmlm's Board - I2 Archive - Programming - About source...
  
User name:
Password:
Reply:
 

UserPost
Darth Coby
Posts: 454/1371
Yes, that's what I meant. It should also have syntax highlighting, well maybe your server doesn't have that enabled or something, but mine does. It makes it really easy to debug scripts and such, you'll never find a missing " faster.
Acmlm
Posts: 528/1173
*tries it*
Hmm, it's the same as renaming it to .txt, I see the source as plain text and the code itself doesn't even run ... or is that just what you meant?
Darth Coby
Posts: 448/1371
If you save the the PHP files as .phps then you CAN see the source, it'll even have syntax highlighting and such.
FreeDOS
Posts: 304/1657
Actually, IIS has an option to give the client the ASP source as well as the parsed file. But, of course, it's disabled by default.

Yes, JavaScript is client side.
Weasel
Posts: 121/454
Javascript, on the other hand, is client side, I think. You can see that source code. But PHP is just fine and dandy.



Always remember, when you code open source, you code communism. A message from your friends at Microsoft.
Acmlm
Posts: 508/1173
Or unless the PHP code doesn't run and the .php comes up as plain text like a .txt

But yeah, it'd simply be too much of a security risk if you could view the source of any PHP, ASP, etc. on any site
HyperLamer
Posts: 310/8210
But the point is no, there's no (known) way to view a PHP file's source short of downloading it from a non-http source.
FreeDOS
Posts: 302/1657
The Web server does not parse the PHP file. PHP's executable creates an extension to the server, so if the server gets a request for a .php, .phps, .php3, or .html file, it sends the file over to the PHP parser to execute it. The parser sends the results to the Web server, and then sends the results to the client. Partially why you can save bandwidth if you instruct PHP to GZip the output.

You can, if the server's on Apache, set up a .htaccess file to prevent the parsing of PHP, for specific extensions, or all at once.
ErkDog
Posts: 181/982
PHP is Executed by the Web server before any output is given.....

the code you see in View Source is nothing but the HTML the PHP tells the browser to output....

the only way to view the acutal PHP code is to get the actual PHP file....
setrodox
Posts: 227/238
Originally posted by Disch
no

to my understanding, php is a server side language, meaning it gets interpretted on the server and the output info gets sent to the browser. I could be wrong about that though... I don't know the technical details.

But PHP code definatly won't show if you view source. Imagine all the security problems that would cause

yeah right. the webserver gets a request to a php file. he sends it to the php interpreter or the php module. this sends back the output(html,image,...) to the webserver. the webserver sends it to the client.
Dish
Posts: 32/596
no

to my understanding, php is a server side language, meaning it gets interpretted on the server and the output info gets sent to the browser. I could be wrong about that though... I don't know the technical details.

But PHP code definatly won't show if you view source. Imagine all the security problems that would cause
Book Keeper
Posts: 30/160
If I open source (IE) when in a php app, will it show the php code?
Acmlm's Board - I2 Archive - Programming - About source...


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.012 seconds.