|
|
|
||||
|
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() |
|
|||||||
| Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
|
Thread Tools |
|
|
#1 |
|
Yes that IS me. Bitch.
Industry Role:
Join Date: Nov 2001
Posts: 14,149
|
I need plugin to run php inside a wordpress post
I just tried phpexec & runphp, neither of which work.
Anyone got or know wordpress plugin that will allow me to run php inside a wordpress post? |
|
|
|
|
|
#2 |
|
So Fucking Banned
Join Date: Jan 2005
Location: At My Desk
Posts: 2,904
|
Exec-PHP is what to use no?
|
|
|
|
|
|
#3 |
|
Yes that IS me. Bitch.
Industry Role:
Join Date: Nov 2001
Posts: 14,149
|
|
|
|
|
|
|
#4 |
|
Damn Right I Kiss Ass!
Industry Role:
Join Date: Dec 2003
Location: Cowtown, USA
Posts: 32,428
|
Read the comments on Exec-php page and you will find a link to the new version that does work.
|
|
|
|
|
|
#5 |
|
Confirmed Moneymaker
Industry Role:
Join Date: Apr 2002
Location: Eugene, OR It's Like Jail, Only with Trees!
Posts: 9,853
|
Make sure you are editing in the "CODE" tab only and saving in the "CODE" tab.. once edited in the WYSIWYG editor it will fubar it... exec-php is great
__________________
I'm here for the violence! |
|
|
|
|
|
#6 |
|
visit hardlinks.org
Industry Role:
Join Date: Jun 2003
Location: Las Vegas , Nv >>> [email protected] or icq 94994627 anytime
Posts: 18,362
|
|
|
|
|
|
|
#7 |
|
null
Industry Role:
Join Date: May 2006
Posts: 9,820
|
Yeah make sure you aren't using Visual editor. If you need help I am expert at Wordpress... hit me up
|
|
|
|
|
|
#8 |
|
Confirmed User
Join Date: Nov 2005
Location: ICQ - 703894
Posts: 1,949
|
+1 for exec-php.
|
|
|
|
|
|
#9 |
|
So Fucking Banned
Join Date: Nov 2005
Location: Netherlands
Posts: 468
|
Turn the stupid visual editor off, its pointless
|
|
|
|
|
|
#10 |
|
Yes that IS me. Bitch.
Industry Role:
Join Date: Nov 2001
Posts: 14,149
|
I have visual editor off and also have role manager plug in.
I have tgp on root & blog in dir. Script is in root & I'm trying to include tgp script in post or page thats on blog in dir as; Code:
<?
include("../script.php");
$query = "SELECT COUNT(url) AS numrows FROM links";
$result = mysql_query($query) or die('Error, query failed');
$row = mysql_fetch_array($result, MYSQL_ASSOC);
$numrows = $row['numrows'];
$maxPage = ceil($numrows/65);
$sql = "SELECT url, title, date FROM `links` ORDER BY date DESC LIMIT ".$offset.", 65;";
$rs = mysql_query($sql);
echo mysql_error();
$self = $_SERVER['PHP_SELF'];
$nav = '';
for($page = 1; $page <= $maxPage; $page++)
{
if ($page == $pageNum)
{
$nav .= " $page ";
}
else
{
$nav .= " <a href=\"$self?page=$page\">$page</a> ";
}
}
while($row = mysql_fetch_row($rs)){
echo "<a href=\"".$row[0]."\">".$row[1]."</a>".$row[2]."\n<br>\n";}
echo "<p>Page: ";
$self = $_SERVER['PHP_SELF'];
$nav = '';
for($page = 1; $page <= $maxPage; $page++)
{
if ($page == $pageNum)
{
$nav .= " $page ";
}
else
{
$nav .= " <a href=\"$self?page=$page\">$page</a> ";
}
}
echo $first . $prev . $nav . $next . $last;
mysql_close();
?>
Code:
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ? 65′ at line 1 Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /dirname/0/blahblah/htdocs/file/name/wp-content/plugins/exec-php/runtime.php(41) : eval()?d code on line 29 |
|
|
|
|
|
#11 |
|
Damn Right I Kiss Ass!
Industry Role:
Join Date: Dec 2003
Location: Cowtown, USA
Posts: 32,428
|
This is because $offset isn't holding a value.
How is offset being passed to your script? If it is by the address (GET) then you need something like: Code:
$offset = $_GET['offset']; |
|
|
|
|
|
#12 |
|
Confirmed User
Join Date: Jan 2006
Location: Austria
Posts: 226
|
run_php works great for me !
http://dev.wp-plugins.org/wiki/RunPHP
__________________
|
|
|
|
|
|
#13 | |
|
Yes that IS me. Bitch.
Industry Role:
Join Date: Nov 2001
Posts: 14,149
|
Quote:
So I have this text tgp for a bit on domain.com then decided to add a blog on domain.com/blog and now I'm trying to include the script in a blog post or a blog page so I can move blog to domain.com & still have the text tgp present on the site. |
|
|
|
|
|
|
#14 |
|
Adult Content Provider
Industry Role:
Join Date: May 2005
Location: Europe
Posts: 18,243
|
exec-php should do the trick
|
|
|
|
|
|
#15 |
|
Yes that IS me. Bitch.
Industry Role:
Join Date: Nov 2001
Posts: 14,149
|
|
|
|
|