| | |
PHP Issue
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jul 2006
Posts: 197
Reputation:
Solved Threads: 5
Hi
I am trying to open the explorer window using php code .But i got the security issue .Please help me how to solve the issue.
I got this error message Please help me how to fix the issue
Security Error: Content at http://localhost/test.php may not load or link to file:///opt.
I am trying to open the explorer window using php code .But i got the security issue .Please help me how to solve the issue.
PHP Syntax (Toggle Plain Text)
<a href="file:///opt" target="_blank">adas</a>
I got this error message Please help me how to fix the issue
Security Error: Content at http://localhost/test.php may not load or link to file:///opt.
Last edited by peter_budo; Nov 27th, 2008 at 7:40 pm. Reason: Correcting [code] for correct display
Thanks
VSSP
VSSP
It is because you are using the "file" protocole. When managing documents with php, use a relative path which does not breach apachies web root settings. So if your script is in the directory "C:/xampp/htdocs/example/test/index.php" and you want to unlink/delete a file in the web root directory then you would use the string "../../file.php" but with xampp for example, you can't delete anything above the htdocs folder as that is the web root. So try and use relative paths that do not breach the web root.
Try not to bump 10 year old threads as it can be really annoying.
Like php then read my website at http://syntax.cwarn23.net/
Star-Trek-Atlantis - now that's what I call a movie ^_^
My favourite PC. - MacGyver Fan
Bad english note: dis-iz-2b4u
Like php then read my website at http://syntax.cwarn23.net/
Star-Trek-Atlantis - now that's what I call a movie ^_^
My favourite PC. - MacGyver Fan
Bad english note: dis-iz-2b4u
I have just done a few tests and it looks like you need to use the http protocole and not the file protocole under the windows operating system due to some windows security feature. I tried both php and javascript to access a file under the file protocole and the error as you mentioned occured. So try locating the file from an address like:
http://domain.com/folder/file.doc
-or via ip-
http://184.294.495.304/folder/file.doc
If you choose to use the ip method you will need apachie installed and the web directory setup. Also you will only be able to access through the http protocole what is theoretically online although the files can be hidden from other users via htaccess. Other than that, I would suggest using a more dedicated client side language such as Java to do the job.
http://domain.com/folder/file.doc
-or via ip-
http://184.294.495.304/folder/file.doc
If you choose to use the ip method you will need apachie installed and the web directory setup. Also you will only be able to access through the http protocole what is theoretically online although the files can be hidden from other users via htaccess. Other than that, I would suggest using a more dedicated client side language such as Java to do the job.
Try not to bump 10 year old threads as it can be really annoying.
Like php then read my website at http://syntax.cwarn23.net/
Star-Trek-Atlantis - now that's what I call a movie ^_^
My favourite PC. - MacGyver Fan
Bad english note: dis-iz-2b4u
Like php then read my website at http://syntax.cwarn23.net/
Star-Trek-Atlantis - now that's what I call a movie ^_^
My favourite PC. - MacGyver Fan
Bad english note: dis-iz-2b4u
![]() |
Similar Threads
- Php Spacing (PHP)
- need help with a php issue (PHP)
- New to php and getting frustrated (HTML and CSS)
- HTML Select and PHP 5 - Issue (PHP)
- New to php and getting frustrated (PHP)
Other Threads in the PHP Forum
- Previous Thread: Problem in sending mail
- Next Thread: need put banner to my account table on PTC site
| Thread Tools | Search this Thread |
apache api array beginner binary broken cache cakephp checkbox class cms code confirm cron curl customizableitems database date display dynamic echo email error external fcc file files folder form forms forum freelancing function functions google header headmethod howtowriteathesis href htaccess html iframe image include insert ip javascript joomla limit link login mail malfunction menu method mlm mod_rewrite multiple mysql neutrality oop pageing pagerank paypal pdf php phpmysql play problem query question radio random recursion remote root script search select server sessions sms soap source space sql support! syntax system table template tutorial update upload url validator variable video web youtube






