Sliffer21 Posted July 22, 2011 Share Posted July 22, 2011 I am hoping someone can help me, I want to display my announcements on a php page after seeing the script in the support topics. The script is: <?php include("support/dbconnect.php"); include("support/includes/functions.php"); $query = "SELECT * FROM tblannouncements WHERE published='on' ORDER BY date DESC LIMIT 0,3"; $result = mysql_query($query); while ($data = mysql_fetch_array($result)) { $id = $data["id"]; $date = $data["date"]; $title = $data["title"]; $announcement = $data["announcement"]; $date = fromMySQLDate($date); echo("<p><font color=#cccccc>$date</font> - <b>$title</b><br>$announcement</p>"); } ?> but when I edit "support" and change it to whmcs I get an error 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Support Manager WHMCS John Posted July 22, 2011 WHMCS Support Manager Share Posted July 22, 2011 Check with your server admin/hosting provider that the path you're entering is valid. What's the exact error you get as that will probably provide a clue. 0 Quote Link to comment Share on other sites More sharing options...
Sliffer21 Posted July 22, 2011 Author Share Posted July 22, 2011 Warning: include(/whmcs/dbconnect.php) [function.include]: failed to open stream: No such file or directory in /home/<cpanelusername>/public_html/staff/index.php on line 120 Warning: include() [function.include]: Failed opening '/whmcs/dbconnect.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/<cpanelusername>/public_html/staff/index.php on line 120 Warning: include(/whmcs/includes/functions.php) [function.include]: failed to open stream: No such file or directory in /home/<cpanelusername>/public_html/staff/index.php on line 121 Warning: include() [function.include]: Failed opening '/whmcs/includes/functions.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/<cpanelusername>/public_html/staff/index.php on line 121 Warning: mysql_query() [function.mysql-query]: Access denied for user '<cpanelusername>'@'localhost' (using password: NO) in /home/<cpanelusername>/public_html/staff/index.php on line 123 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/<cpanelusername>/public_html/staff/index.php on line 123 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/<cpanelusername>/public_html/staff/index.php on line 124 0 Quote Link to comment Share on other sites More sharing options...
Sliffer21 Posted July 22, 2011 Author Share Posted July 22, 2011 And I host my own servers so thats the correct path 0 Quote Link to comment Share on other sites More sharing options...
Sliffer21 Posted July 22, 2011 Author Share Posted July 22, 2011 It keeps trying to open the files in the directory that the page is in /staff it needs to be looking in /whmcs 0 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.