dongxie7683 2016-08-14 14:50
浏览 61

Wordpress:在服务器上传时无法找到文件和页面

I have recently uploaded a wordpress in my server. In the localhost, it is working but when I uploaded it, some pages cannot be found. I figured it was because of the paths.

All my template files are inside a theme folder. Some of the template files are calling some php files which can be found in the root directory. For example, the print button in the template-product.php calls the printProductProfile.php.

I am using the following jquery code but it's not working. It says page cannot be found. How can I fix this?

//jquery code in template-product.php
('#print').click(function(e){   
    var productID = document.getElementById('productID').value;
     popupWindow = window.open(
                '../printProductProfile.php?id='+productID, 
                'PDF Viewer',
                'height=700,width=800,left=10,top=10,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no,status=yes');

});

Shown below is the structure of my folders and files.

public_html
  -printProductProfile.php
  -wp-content
     -themes
        -myTheme-child
            -template-product.php
  • 写回答

1条回答 默认 最新

  • douhan9191 2016-08-14 14:57
    关注

    Use ABSPATH Like

    ABSPATH.'/printProductProfile.php?id='+productID

    or use 'printProductProfile.php?id='+productID

    评论

报告相同问题?

悬赏问题

  • ¥15 keil的map文件中Image component sizes各项意思
  • ¥30 BC260Y用MQTT向阿里云发布主题消息一直错误
  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 Centos / PETGEM
  • ¥15 划分vlan后不通了
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)