简体   繁体   中英

XAMPP Permission Denied for Require_Once Mac OS X Yosemite

Problem:

I'm trying to open headerr.php via require_once on a XAMPP localhost server. I'm calling this function through index.php but I keep on receiving the following error message

Errors:

Warning: require_once(/Applications/XAMPP/xamppfiles/htdocs/Baseline/headerr.php): failed to open stream: Permission denied in /Applications/XAMPP/xamppfiles/htdocs/Baseline/index.php on line 2

Fatal error: require_once(): Failed opening required 'headerr.php' (include_path='.:/Applications/XAMPP/xamppfiles/lib/php') in /Applications/XAMPP/xamppfiles/htdocs/Baseline/index.php on line 2

Attempted Solutions:

-I've tried setting the permissions to Read & Write for everyone on the (/Applications/XAMPP) Folder but that hasn't fixed the permissions issue.

-I've also tried using require_once dirname( FILE ) . '/headerr.php'; but that didn't work either..

In Conclusion:

I suspect that I may have to edit the php.ini file but I have no clue what to do.. I appreciate any advice or insight, thanks!

试试这个命令:

chmod -R 775 yourWebFolder

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM