ifm1989 Posted November 30, 2007 Share Posted November 30, 2007 I have a server with apache/cpanel 10. I started a new cron command which succeeds in calling a file: php /home/my_site/public_html/cron/messages_cron.php Problem: I don't want some random user trying to access the script. Therefore, I tried moving it into a different folder than public_html Example: php /home/my_site/cron/messages_cron.php Problem: I needed to include a file called core.php which was located in public_html, and I couldn't figure out a way to do so. Any ideas? I tried: require_once "../public_html/filename.php"; That didn't seem to work. Quote Link to comment Share on other sites More sharing options...
hannibal Posted March 10, 2008 Share Posted March 10, 2008 Does anyone have a reply for this as I am in the same boat? Thanks, H. Quote Link to comment Share on other sites More sharing options...
trq Posted March 10, 2008 Share Posted March 10, 2008 How about... include '/home/my_site/public_html/core.php'; Quote Link to comment Share on other sites More sharing options...
hannibal Posted March 10, 2008 Share Posted March 10, 2008 I will give that a try and post whether it solved my issue. Mega thanks for the instant reply Thorpe! H. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.