/    Sign up×
Community /Pin to ProfileBookmark

Is It Possible To HIde My Php Code From the Show_source Function

Because I was going to make a passwords array, but I dont think I can if people can access it

to post a comment
PHP

5 Comments(s)

Copy linkTweet thisAlerts:
@santaApr 29.2008 — PHP is a server side language. Users can only see HTML after the page is compiled using PHP directions.
Copy linkTweet thisAlerts:
@SyCoApr 29.2008 — There was a time a few years ago when people called their includes include.inc but .inc files are treated as text files by the server so you could access the source. Any page with a .php extension is safe from viewing unless you get your code horribly wrong! ?

show_source() wont give external access to you php code, it's simply an alias of highlight_file().

http://us3.php.net/manual/en/function.show-source.php
Copy linkTweet thisAlerts:
@felgallApr 29.2008 — If you do use .inc for the file type then you can always associate that with PHP from within the .htaccess file and also add a single command into the top of the file that blocks it being accessed separately.
Copy linkTweet thisAlerts:
@SyCoApr 29.2008 — or not use .inc and have portable code ?
Copy linkTweet thisAlerts:
@jstestpagerauthorApr 29.2008 — ok thanks ?
×

Success!

Help @jstestpager spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.3,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...