SEOClerks

How to run a PHP file on your browser?



Write the reason you're deleting this FAQ

How to run a PHP file on your browser?

If you open a HTML file using your browser, it will open fine. However, this is not the case with PHP because PHP needs to be processed on a web server. If you open a PHP file with your browser, it will show your PHP code. In order to open a PHP file using your browser, you need to download a local web server. A few examples are MAMP, XAMPP and WAMP.

How to run a PHP file on your browser?

Once you downloaded a web server, you will need to put your files in your working folder. Normally, it is either “public_html” or “htdocs”. However, it can be something else. Once you put your files in that folder, go to localhost/filename.php if the name of your file is filename.php. Before, you do that make sure your web server is online (don’t make the mistake I did).

Comments

Please login or sign up to leave a comment

Join
MendasDigital
Great post. I would also add that the PHP software itself has a built in webserver feature (accessed with the -S option), which can be useful if you just need to quickly test a page in your browser.



Are you sure you want to delete this post?

overcast
I have used BITNAMI. As that stack is lot better compared to the apachefriends XAMPP. You have to just install it and let the services run. Once the services start running, you can easily get to do the stuff. You can't easily run PHP files on browser though unless you are running any PHP based servers. Running such servers would allow you to run PHP file through localhost.



Are you sure you want to delete this post?

Order Now
Process Time: 0.32556390762329

Possible Duplicate queries found!
MatchCountSQLScript
SELECT * FROM members_ledger WHERE ip = ? AND added>=unix_timestamp(NOW())-864001SELECT querystring, added FROM members_ledger WHERE ip = ? AND added>=unix_timestamp(NOW())-86400

/opt/clerks-staging/docroot/include/functions/includes/security.php 398 fetchMemberLedger() include_once()

SELECT * FROM `questions` as q JOIN categories_faq as c ON q.catid=c.CATID WHERE (q.status=1 OR (q.status=2 AND userid='') ) AND q.quesid='10117'1SELECT q.*, c.seo as CatSEO, c.name as CatName, c.parentid FROM `questions` as q JOIN categories_faq as c ON q.catid=c.CATID WHERE (q.status=1 OR (q.status=2 AND userid='') ) AND q.quesid='10117'

/opt/clerks-staging/docroot/viewfaq.php 496 () ()

SELECT * FROM seoclerks.members WHERE USERID='311920'1SELECT * FROM seoclerks.members WHERE USERID='311920'

/opt/clerks-staging/docroot/include/functions/includes/member.php 445 GetAllUserDetails() ()

SELECT * FROM seoclerks.members WHERE USERID=3119201SELECT googleplus_profile FROM seoclerks.members WHERE USERID=311920

/opt/clerks-staging/docroot/include/functions/main.php 16914 GetGooglePlusProfileFromId() ()

SELECT * FROM ratings_faq as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=10117 LIMIT 51SELECT m.username FROM ratings_faq as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=10117 LIMIT 5

/opt/clerks-staging/docroot/include/functions/main.php 17159 GetVoters() ()

SELECT * FROM answers a, seoclerks.members b WHERE a.quesid='10117' AND a.userid=b.USERID and b.status='1' AND a.status=1 ORDER BY a.combined_votes DESC, a.date_answered asc1SELECT a.answer, a.USERID, a.upvotes, a.downvotes, a.ansid, a.parentid, a.combined_votes, a.date_answered, b.username, b.userlevel, b.profilepicture FROM answers a, seoclerks.members b WHERE a.quesid='10117' AND a.userid=b.USERID and b.status='1' AND a.status=1 ORDER BY a.combined_votes DESC, a.date_answered asc

/opt/clerks-staging/docroot/viewfaq.php 1245 () ()

SELECT * FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=97508 LIMIT 51SELECT m.username FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=97508 LIMIT 5

/opt/clerks-staging/docroot/include/functions/main.php 17159 GetVoters() ()

SELECT * FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=117792 LIMIT 51SELECT m.username FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=117792 LIMIT 5

/opt/clerks-staging/docroot/include/functions/main.php 17159 GetVoters() ()

UPDATE questions SET total_views = total_views + 1 WHERE quesid='10117'1UPDATE questions SET total_views = total_views + 1 WHERE quesid='10117'

/opt/clerks-staging/docroot/include/functions/main.php 1765 update_Faqviewcount() ()

SELECT * FROM questions WHERE quesid!='10117' AND status='1' AND (question like '%How run PHP file browser?%' OR question like '%file%' OR question like '%browser?%') -- ORDER BY RAND() LIMIT 151SELECT quesid, question, seo, userid FROM questions WHERE quesid!='10117' AND status='1' AND (question like '%How run PHP file browser?%' OR question like '%file%' OR question like '%browser?%') -- ORDER BY RAND() LIMIT 15

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() ()

SELECT * FROM seoclerks.members WHERE USERID='8619' limit 11SELECT profilepicture FROM seoclerks.members WHERE USERID='8619' limit 1

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() insert_get_member_profilepicture()

SELECT * FROM seoclerks.members WHERE USERID='1628' limit 11SELECT profilepicture FROM seoclerks.members WHERE USERID='1628' limit 1

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() insert_get_member_profilepicture()

SELECT * FROM seoclerks.members WHERE USERID='17031' limit 11SELECT profilepicture FROM seoclerks.members WHERE USERID='17031' limit 1

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() insert_get_member_profilepicture()

SELECT * FROM seoclerks.members WHERE USERID='12262' limit 11SELECT profilepicture FROM seoclerks.members WHERE USERID='12262' limit 1

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() insert_get_member_profilepicture()

SELECT * FROM members_ledger WHERE script='/opt/clerks-staging/docroot/viewfaq.php' AND querystring LIKE '%id=10117%' AND added>=UNIX_TIMESTAMP(NOW())-1200 GROUP BY USERID 1SELECT USERID, username FROM members_ledger WHERE script='/opt/clerks-staging/docroot/viewfaq.php' AND querystring LIKE '%id=10117%' AND added>=UNIX_TIMESTAMP(NOW())-1200 GROUP BY USERID

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() ()

SELECT * FROM categories1SELECT * FROM categories

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() parseRedundantQueriesCache()

select * from categories_software order by name asc1select * from categories_software order by name asc

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() insert_GetSoftwareCategories()

select * from categories_wanttobuy order by name asc1select * from categories_wanttobuy order by name asc

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() insert_get_wantcategories()

select * from categories_wanttotrade order by name asc1select * from categories_wanttotrade order by name asc

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() insert_get_tradecategories()

SELECT * FROM seoclerks.members WHERE USERID='486532.jpg'1SELECT profilepicture FROM seoclerks.members WHERE USERID='486532.jpg'

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() getUserProfileImage()

SELECT * FROM seoclerks.members WHERE USERID='589438.jpg'1SELECT profilepicture FROM seoclerks.members WHERE USERID='589438.jpg'

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() getUserProfileImage()

select * from categories_faq order by name asc1select * from categories_faq order by name asc

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() insert_GetFaqCategories()

Invalid SQL

count(*)sql1error_msg

Expensive SQL

Tuning the following SQL could reduce the server load substantially
LoadCountSQLMaxMin

Suspicious SQL

The following SQL have high average execution times
Avg TimeCountSQLMaxMin
0.2853731SELECT A.*, B.seo, B.name as categoryname, C.username, C.userlevel, C.lastlogin, C.ip, C.profilepicture FROM wanttobuy A, categories_wanttobuy B, seoclerks.members C WHERE A.active = 1 AND A.category = B.CATID AND A.USERID = C.USERID ORDER BY A.bdays desc LIMIT 0,400.2853730.285373
0.1786601SELECT COUNT(A.wantid) AS total FROM wanttobuy as A, categories_wanttobuy B, seoclerks.members C WHERE A.active = 1 AND A.category = B.CATID AND A.USERID = C.USERID 0.1786600.178660